OTOH, this is really just a convenience method, and the only place it is used 
in the codebase is in the unit tests. Also, there are a number of overloads 
whose primary purpose appears to be to prevent the caller from having to catch 
SerializationException. These methods are fairly old, and in retrospect, this 
seems misguided.

I think it would probably be best to eliminate these methods.

On Sep 9, 2010, at 12:25 PM, Greg Brown wrote:

> 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