stan-dev/stan — pull request #618 by mitzimorris (2014-04-09 11:47:28+00:00)
Title: Feature/issue 595 json

#### Summary:

The namespace stan::io::json classes can be used to read in Stan variable declarations in JSON format, as specified on wiki page https://github.com/stan-dev/stan/wiki/JSON-for-model-data-and-parameters.

#### Intended Effect:

The intended effect is to replace the use of a stan::io::dump object to read in the variable declarations from a file in S dump format, however this pull request in and of itself will not change this behavior. To effect this change, it is necessary to change the program that reads in the Stan data files - either command Stan, PyStan, or RStan.

#### How to Verify:

Unit tests are supplied for the json_parser and json_data classes. Integration testing for command Stan was done by changing the file stan/common/command.hpp line #121 so that the type of the variable data_var_context is a json::json_data object instead of an io::dump object and running Stan models with data files in JSON format instead of Rdump format.

#### Side Effects:

No known side effects.

#### Documentation:

There is class-level documentation for each of these classes. The file json_data_handler.hpp documents the semantics of a Stan JSON object. Once the option to read in Stan data in JSON format has been added, this information should be added to the Stan manual and all example models should be provided with data input files in JSON format.

#### Reviewer Suggestions:

Daniel Lee would be the best candidate to review this code.