pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Preferences class
Date Wed, 08 Apr 2009 11:47:01 GMT
>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:


or a combination thereof


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

prefs.put("[\"accent'inside\"]", "accent'inside");

View raw message