Skip to content

Less than sign "<" turns to unicode with gron tool #22

@davgibbs

Description

@davgibbs

Hi @tomnomnom

Only just started to use the gron tool, so maybe I am missing something!

When I include a "<" as part of my json file, the "groned" data output includes the unicode (http://unicode-table.com/en/#003C) version of the character "<" (\u003c).

[david.gibbons@7V0DZY1 ~]$ gron --version
gron version 0.3.6
[david.gibbons@7V0DZY1 ~]$ 
[david.gibbons@7V0DZY1 ~]$ cat example.json 
{
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "<S"
        }
    }
}
[david.gibbons@7V0DZY1 ~]$ gron example.json
json = {};
json.glossary = {};
json.glossary.GlossDiv = {};
json.glossary.GlossDiv.title = "\u003cS";
json.glossary.title = "example glossary";
[david.gibbons@7V0DZY1 ~]$ gron example.json | grep '<'
[david.gibbons@7V0DZY1 ~]$
[david.gibbons@7V0DZY1 ~]$ cat example.json | grep '<'
            "title": "<S"
[david.gibbons@7V0DZY1 ~]$

So then I cannot grep for "<" directly, even though it is in my json file.

Is this something that can be fixed? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions