> > But we don't have the luxury of ignoring the number/string distinction > in JSON. Some way of controlling the types is required. The > mechanism I've come up with covers most cases of unintentional type > changes, allows for intentional type changes, and will round trip > properly. > True enough, but the very vague string/integer distinction of core types is a really poor choice of interface to achieve proper serialization, and there are other solutions you could devise. For instance, you could define JSON::string and JSON::num classes that overload the usual operators and that map to and from the corresponding JSON types. At some point you folks should accept that Perl core types don't and won't ever map naturally to JSON types. VincentThread Previous | Thread Next