1 Reply Latest reply on Dec 12, 2014 7:55 AM by VikramR_26

    Issue with JSON parser and negative numbers

      The JSON parser library does not seem to support negative "numbers", the "-" is cut of the object string before the user callback been

      invoked.


      This can be fixed by including the minus sign as part of the object strings, replacing the following tests in multiple places of the JSON parser lib

       

      /* Move value_start token until we encounter a non-digit value */

      -                        while ( ( ( *value_start >= '0' ) && (  *value_start <= '9') ) || ( *value_start == '.' ) )

      by

                               while ( ( ( *value_start >= '0' ) && (  *value_start <= '9') ) || ( *value_start == '.' ) || ( *value_start == '-' )