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

Create to_json #30

Closed
EntilZha opened this issue Sep 26, 2015 · 1 comment
Closed

Create to_json #30

EntilZha opened this issue Sep 26, 2015 · 1 comment
Labels
Milestone

Comments

@EntilZha
Copy link
Owner

Implement to_json

This should give the option to write values as an array at the json root, or if the sequence is a list of (Key, Value) pairs to write it as a dictionary at the json root.

Child of #19

@EntilZha EntilZha added this to the 0.4.0 milestone Sep 26, 2015
@EntilZha
Copy link
Owner Author

EntilZha commented Nov 1, 2015

Going to modify how this works and remove the automatic detection of (Key, Value) pairs in favor of an explicit option. Automatic detection would make it not possible to have a root array written of (Key, Value) pairs without degenerating to an explicit option.

Therefor, type signature will be to_json(path, root_array=True) where if root_array is True, the root will be an array, otherwise it will convert a sequence of (Key, Value) pairs to the root dictionary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant