• AppendValue Generates Invalid JSON for values between 0 and 1

    By Sean Burgess 1 decade ago

    If you use the AppendValue function with a number between 0 and 1, the JSONWriter Class generates an invalid JSON value. This is due to the fact that the leading 0 is left off.

    For example, a value of 1/2 is output as .5 instead of 0.5, which causes some JS to freak out, namely jQuery. jsonlint.org also returns the value as invalid when the first character in the number is the decimal point.

    • By Lars Berntrop 9 years ago

      Thanks! I'm integratring this into a version which will hopefully perform better.