Adrian Crum wrote:
> Adam Heath wrote:
>> ObjectToJSONString, and JSONStringToObject, is fairly straight forward
>> to implement. However, I still need to do my 'resolve' feature.
>> Possibily an ObjectToJSONResolveString, or some such.
>
> What does the resolve feature do?
>
JSON only supports String, booleans, numbers(Long or Double),
arrays(List), and object(Map).
The resolve feature extends that, by parsing this pattern:
resolve("java.net.URL:http:\/\/ofbiz.apache.org")
That becomes a raw token in the markup. It allows me to embed any
other object that has a String representation into a json output
string. I don't want to have to write separate ToJSONString
converters for *every* non-standard object, I'd like to have just one.
But, to do that, I have to be able to get a bi-directional string
representation of whatever object. Calling .toString in such cases
doesn't work(which is what your original ListToString converter did).