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

Request json_parser::read_json(boost::filesystem::path const&, ...) #49

Open
mfsv opened this issue Apr 28, 2020 · 0 comments
Open

Request json_parser::read_json(boost::filesystem::path const&, ...) #49

mfsv opened this issue Apr 28, 2020 · 0 comments

Comments

@mfsv
Copy link

mfsv commented Apr 28, 2020

There are currently two signatures available:

  • read_json(std::string const&, ...)
  • read_json(std::basic_istream<...> const&, ...)

In case of Windows and a file name with non-standard characters I cannot rely on read_json(std::string const&, ...).

I therefore use this workaround:
boost::filesystem::path const filename(L"Some foreign language file name");
boost::filesystem::ifstream ifs(filename);
read_json(ifs, ...);

In case of an error, the exception thrown does not contain the filename and I have to construct a message of my own.

I would like to request these additions:

  • read_json(boost::filesystem::path const&, ...)
  • read_json(std::wstring const&, ...)
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

No branches or pull requests

1 participant