That's a static method, so it can't see the "alwaysDelimitMapKeys" instance 
variable. However, it probably makes sense to add an overloaded version of this 
method that take an "alwaysDelimitMapKeys" boolean argument. 


On Sep 9, 2010, at 11:27 AM, István Lakatos wrote:

> Hi,
> it seems,that the 
> org.apache.pivot.json.JSONSerializer.setAlwaysDelimitMapKeys() method has no 
> effect to the .toString() method's result. If you vill look at the source 
> code of the above class at apache-pivot-1.5.1 org.apache.pivot.json package, 
> you find 
> 
> public static String toString(Object value) throws SerializationException {
>         JSONSerializer jsonSerializer = new JSONSerializer();
>         StringWriter writer = new StringWriter();
> 
> meaning, that a new JSONSerializer object is created with the default 
> alwaysDelimitMapKeys=false value, so the original setting has no meaning.
> I hope I'm mistaken.

Reply via email to