Hi Milan,
hb_jsonEncode( <string|numeric|logical|date|timeStamp|array|hash|nil>, [<.humanReadable.>], [<codePage>] ) -> jsonString
* requieres any of above harbour types, returns a json string
hb_jsonDecode( <jsonString>, nil, [<codePage>] ) -> Harbour value
hb_jsonDecode( <jsonString>, @var, [<codePage>] ) -> length of decoded <jsonString>, var will contain the resulting Harbour value
* require a properly jsonString and returns a Harbour value representing the jsonString
To properly create a jsonString which is contained in curly braces "{ ... }" you need
pass to the hb_jsonEncode() function a Harbour Hash whose items has string keys
h :={"name"=>"Milan","first"=>"Mehta","age"=>35}
hb_jsonEncode(h,.t.)
will return:
{
"name":"Milan",
"first":"Mehta",
"age":35
}
( and if you hb_jsonDecode it, you'll get a Harbour Hash representation of it )
So, if you want to get: