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

JSON.parse conflicts with Main.parse #35

Closed
stevengj opened this issue Jul 23, 2013 · 1 comment
Closed

JSON.parse conflicts with Main.parse #35

stevengj opened this issue Jul 23, 2013 · 1 comment

Comments

@stevengj
Copy link
Member

julia> using JSON
Warning: using JSON.parse in module Main conflicts with an existing identifier.

The function parse in Main parses a string containing Julia code to an AST Expr.)

Probably the best solution is to simply not export it, so that users call it as JSON.parse. Then, for symmetry, you could rename print_to_json to JSON.print (and not export print).

(On the subject of renaming, it seems more Julian to simply have json(x) instead of to_json(x).)

@WestleyArgentum
Copy link
Contributor

I agree with each of these points. parse and to_json have bugged me for awhile.

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

No branches or pull requests

2 participants