Quantcast
Channel: VFPX
Viewing all articles
Browse latest Browse all 3798

Commented Unassigned: nfjson doesn't unescape special characters [43558]

$
0
0
Hi,

when I use nfjsoncreate special characters (like for example double quotes) are correctly escaped, so the output for the following code:

```
pair = CREATEOBJECT("empty")
addproperty(pair , "context", '"hello"')

json = nfjsoncreate(pair)
```

is correctly

```
{"context":"\"hello\""}
```

However if we take this output and try to rebuild the original object, the double quotes are not unescaped. To be more clear the output for the following code:

```
pair = CREATEOBJECT("empty")
addproperty(pair , "context", '"hello"')

json = nfjsoncreate(pair)

deserialobj = nfjsonread(json)
?nfjsoncreate(deserialobj)
```

is

```
{"context":"\\\"hello\\"}
```

Maybe there is a problem with function unescapecontrolc from nfjsonread?
Comments: ** Comment from web user: mplazac **


Hi adelbene, I re-checked and it works properly.

Maybe you are running the old fxp?.

Don't hesitate on reporting any other issue.


Viewing all articles
Browse latest Browse all 3798