Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

Possible ways of creating json string dynamicaly

HI,
Currently in my code i am creating a json string like :
        String json = "{\"text\" : \""+text+"\"}";

Open in new window

For just this small json i dont want to include any library like Gson or....etc...

what are the possible ways in which i can make the above json...probably avoiding these quotes as much as possible and using a variable in between as it is error prone.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of gurpsbassi
gurpsbassi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial