Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pretty print JSON config. #179

Merged
merged 1 commit into from
Apr 4, 2015
Merged

Conversation

Tonkpils
Copy link
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
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