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

Add JSON package #2589

Merged
merged 3 commits into from
Sep 6, 2022
Merged

Add JSON package #2589

merged 3 commits into from
Sep 6, 2022

Conversation

d-torrance
Copy link
Member

This package translates back and forth between JSON data (given in strings or files) and Macaulay2 things. For example:

i2 : fromJSON "{\"foo\": [1, 2, 3], \"bar\": true}"

o2 = HashTable{bar => true     }
               foo => {1, 2, 3}

o2 : HashTable

i3 : toJSON oo

o3 = {"foo": [1, 2, 3], "bar": true}

It looks like this package might be useful for the the polymake interface (see the corresponding project). In the longer term, I'm planning on using it to develop a Macaulay2 language server.

@mikestillman
Copy link
Member

@d-torrance Great! How much of the JSON standard did you include?

@d-torrance
Copy link
Member Author

@d-torrance Great! How much of the JSON standard did you include?

All of it!

@DanGrayson DanGrayson merged commit 6b41a16 into Macaulay2:development Sep 6, 2022
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.

3 participants