diff --git a/colout/colout_json.py b/colout/colout_json.py index 4784a74..5eaefeb 100644 --- a/colout/colout_json.py +++ b/colout/colout_json.py @@ -1,8 +1,12 @@ 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 [ - [ '[][{}]' ], - [ '[:,]', "yellow" ], + [ '[\[\]{}],*\s*\n' ], + [ '" (:) ', "yellow" ], + [ '[\]}"](,)', "yellow" ], + [ "\"(-*[0-9]+\.*[0-9]*e*-*[0-9]*)\"", "blue" ], [ '"(.*)"', "green" ], [ """["']""", "cyan" ] ]