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

Created 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?

Viewing all articles
Browse latest Browse all 3798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>