Key name string vs. value string

Issue #23 duplicate
created an issue

I don't know if this is solvable in the existing solution somehow, but when you transverse a token array, how do you distinct between a key name and a value string?

It's fairly important when searching for a given key, that you don't mistake a "value" for a key name.

I propose that the JSMN_STRING be divided into a JSMN_KEY and a JSMN_STRING_PRIMITIVE. (Or something like that.)

Comments (3)

  1. Serge Zaitsev repo owner

    Thanks for your contribution! Normally, I process key/value pairs by odd/even positions inside the object. I like the separate token type for keys more than what was proposed earlier, most likely I'll implement it this way soon. Again, thanks for helping jsmn! I will mark this issue as duplicate to keep things in a single place.

  2. Log in to comment