akheron / jansson

C library for encoding, decoding and manipulating JSON data
http://www.digip.org/jansson/
Other
3.05k stars 811 forks source link

add json_object_getn for substring #539

Closed irov closed 3 years ago

irov commented 4 years ago

Hi, I am writing a parser for text and I often need to replace tags whose table is in jansson. And it would be convenient for me to use a string segment. like json_string_setn

example: "Hello, $[name]", i find $[ and ] and send to json_object_getn ptr for 'name]' and len equal 4

Thanks!

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-1.1%) to 94.284% when pulling 37534976725ce944228c7f0e83b6436d2f96cc83 on irov:improve_json_object_getn into 52dfc3dd4a766fc2f1a19edad5d5cfdd21e0ec27 on akheron:master.

Mephistophiles commented 4 years ago

Hi, The PR #520 has already implement similar functions.

irov commented 4 years ago

Hi, The PR #520 has already implement similar functions.

Ok. Thanks!

akheron commented 3 years ago

Added in #520