"cpjamloki" wrote:
I have to post http request to server,but i have json data as a parameter like:
...
You can either start with a valid JSON value in a string, that you got from a server or built yourself, or you can start with an object representation, i.e. an associative array.
If you are starting with a JSON string value, but you want to change some values or otherwise manipulate it, you can first convert it to an object representation using ParseJSON.
Then, when the object representation is the way you want, you can convert it to a JSON string value using FormatJSON.
You should sent that string value as the parameter to your AsyncPostFromString call.
(I doubt you want to do any escaping at that point, as the POST is sending data, not a URL).
Example:
s = "{'a':'z','b':2}"
s = s.Replace("'", chr(34))
print s
REM {"a":"z","b":2}
o = ParseJSON(s)
o.b = 3
s = FormatJSON(o)
print s
REM {"a":"z","b":3}