Documenting the limits of move_to_key with respect to Unicode Equivalence.
This commit is contained in:
parent
fb920bba62
commit
a1bff85263
|
@ -111,12 +111,16 @@ public:
|
||||||
// We seek the key using C's strcmp so if your JSON strings contain
|
// We seek the key using C's strcmp so if your JSON strings contain
|
||||||
// NULL chars, this would trigger a false positive: if you expect that
|
// NULL chars, this would trigger a false positive: if you expect that
|
||||||
// to be the case, take extra precautions.
|
// to be the case, take extra precautions.
|
||||||
|
// Furthermore, we do the comparison character-by-character
|
||||||
|
// without taking into account Unicode equivalence.
|
||||||
inline bool move_to_key(const char *key);
|
inline bool move_to_key(const char *key);
|
||||||
// when at {, go one level deep, looking for a given key
|
// when at {, go one level deep, looking for a given key
|
||||||
// if successful, we are left pointing at the value,
|
// if successful, we are left pointing at the value,
|
||||||
// if not, we are still pointing at the object ({)
|
// if not, we are still pointing at the object ({)
|
||||||
// (in case of repeated keys, this only finds the first one).
|
// (in case of repeated keys, this only finds the first one).
|
||||||
// The string we search for can contain NULL values.
|
// The string we search for can contain NULL values.
|
||||||
|
// Furthermore, we do the comparison character-by-character
|
||||||
|
// without taking into account Unicode equivalence.
|
||||||
inline bool move_to_key(const char *key, uint32_t length);
|
inline bool move_to_key(const char *key, uint32_t length);
|
||||||
|
|
||||||
// when at a key location within an object, this moves to the accompanying
|
// when at a key location within an object, this moves to the accompanying
|
||||||
|
|
Loading…
Reference in New Issue