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

Adding easy way to write json #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gbittoun
Copy link

Adds an picojson::easyjson objects on which you can easily assign values. I admit it, this code might be doing lot of magic, but I think it is a good thing to provide the developers a way to write such things:

picojson::easyjson v;

v["foo"] = "bar"
v["baz"][0] = 1;
v["baz"][1] = "test";

and finally retrieve the following json: {"foo": "bar", "baz": [1. "test"]} in the end

Writing v.set<type>() then v.get<type>() was quite a pain for me.

Choice is yours, I only suggest… And code may be modified depending on your comments :-)
Cheers

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.

1 participant