colout/colout/colout_json.py
Johann Dreo 1fed20cba7 Expect formatted json as input, blue numbers
This patch avoid coloring what's inside item's strings, but expect a formatted input.
2013-05-17 11:13:53 +02:00

13 lines
387 B
Python

def theme():
# This theme expect a formatted JSON input, with items spread across lines.
# See tools like "python -m json.tool" or "json_xs"
return [
[ '[\[\]{}],*\s*\n' ],
[ '" (:) ', "yellow" ],
[ '[\]}"](,)', "yellow" ],
[ "\"(-*[0-9]+\.*[0-9]*e*-*[0-9]*)\"", "blue" ],
[ '"(.*)"', "green" ],
[ """["']""", "cyan" ]
]