Skip to content

Pretty print JSON config.#179

Merged
kytrinyx merged 1 commit intoexercism:masterfrom
Tonkpils:pretty-json-config
Apr 4, 2015
Merged

Pretty print JSON config.#179
kytrinyx merged 1 commit intoexercism:masterfrom
Tonkpils:pretty-json-config

Conversation

@Tonkpils
Copy link
Copy Markdown
Contributor

@Tonkpils Tonkpils commented Apr 3, 2015

Also, print line number highlight the entire JSON line when a syntax error occurs

errors now point to the line number

2015/04/03 13:17:37 error parsing JSON in the config file /Users/tonkpils/.exercism.json:
invalid JSON syntax at line 3:
    3:  "dir": "/Users/tonkpil\s <~
invalid character 's' in string escape code

And the file now looks like

$ cat ~/.exercism.json                                                                                
{
    "apiKey": <api_key>,
    "dir": "/Users/tonkpils/exercism",
    "api": "http://exercism.io",
    "xapi": "http://x.exercism.io"
}

Also, print line number highlight the entire JSON line when a syntax error occurs
@kytrinyx
Copy link
Copy Markdown
Member

kytrinyx commented Apr 4, 2015

Sweet!

kytrinyx added a commit that referenced this pull request Apr 4, 2015
@kytrinyx kytrinyx merged commit 24ed0f0 into exercism:master Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants