-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Feature/3176 json #3191
Feature/3176 json #3191
Conversation
…into feature/3176-json
…into feature/3176-json
OK, ready for re-review |
…into feature/3176-json
looking at |
…into feature/3176-json
ready for re-re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Three small things but otherwise I think this is ready. New tests all look great.
…into feature/3176-json
The efficient way to do this if you know the instantiations at compile time would be with the CRTP. But I wouldn't do that if the virtual function calls aren't a bottleneck. |
Actually @mitzimorris and @WardBrian one last thing, how should NA and infinite values get handled here? I'm unfamiliar with how json should handle these. |
We print them such that the JSON parser we use can read them back in. This involves using some non-standard atoms, since the JSON spec provides no proper format for these:
|
OK to merge? |
I think so, @SteveBronder? |
Yep good to merge! |
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
Add callback writer to output JSON data.
Intended Effect
Allow structured outputs in JSON format, per design-docs spec https://github.com/stan-dev/design-docs/blob/master/designs/0032-stan-output-formats.md
How to Verify
Unit tests
Side Effects
None
Documentation
N/A
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Coumbia University
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: