>putting a sample value like
> prefs.put("accent'inside", "accent'inside");
>doesn't work anymore (ok, it's a strange key, but is it a right json
>key ?), and gives me an
>Illegal identifier character.
This is the correct behavior. JSON paths can be represented in one of two ways:
a.b.c
["a"]["b"]["c"]
or a combination thereof
a["b"].c
Pivot's JSON serializer requires that keys specified using the dot syntax
contain only valid Java identifier characters (JavaScript enforces a similar
restriction). However, you can use non-identifier characters using the bracket
syntax. If you change your code to this, it should work:
prefs.put("[\"accent'inside\"]", "accent'inside");