]> git.ipfire.org Git - thirdparty/json-c.git/commit
add JSON_C_TO_STRING_COLOR option 772/head
authorMatthias Gatto <matthias.gatto@protonmail.com>
Thu, 2 Jun 2022 15:10:21 +0000 (17:10 +0200)
committerMatthias Gatto <uso.cosmo.ray@gmail.com>
Mon, 10 Jul 2023 18:45:20 +0000 (20:45 +0200)
commit9803032b9d49a518bb7fae3e120f2d9d7e77967a
tree27f545792fa0572dadc5730610d8896822cfb6c5
parentbdfdb5fe1041c0d092110c7abf46f346a6493557
add JSON_C_TO_STRING_COLOR option

This option enable color in json_object_to_json_string_ext.
I've try to made something similar to jq output,
but I've color true/false and null in purple,
as it's what is common color scheme used in programing language in emacs.

also add a '-c' option into json_parser to test it.

note: that I could have done a color() function similar to
what is done with indent(), but as the code is pretty small
I've keep it as it. so if you want  me to use a subfunction
tell me and I'll do it.

Signed-off-by: Matthias Gatto <matthias.gatto@protonmail.com>
apps/json_parse.c
json_object.c
json_object.h