Terry,

>yes I know about strings and numeric conversions.  I want to know is
>there a way to force json to force values to strings.  I have played
>with the parser but it is a PITA and played with adding " " at the
>query level but that is too cumbersome.  I can't believe JSon does not
>have any options or settings that force all values to strings.  Anyone
>played with this at all?

This is an issue with your serializer (or how you're manually creating the
JSON package.) 

If you're using a serializer, it's up to the serializer to correctly format
the data type. Most serializer will attempt to map the data type of the
variable with the correct JavaScript data type. However, some typeless
languages (like ColdFusion) may make assumptions you don't like (for
example, strings that are numeric are likely to be mapped as a numeric
value.) In this case this is an issue with your serializer. 

If your manually creating the JSON data, then it's up to you to make sure
that you generate the JSON packet with the correct data type.

Deserializing JSON in JavaScript is as simple as running the code:

eval(jsonString);

As others have already stated, this is not jQuery issue, but either an issue
with the way your manually generating your JSON packet or with the
serializer your using.

-Dan

Reply via email to