Skip to content

Frequently Asked Questions (FAQ)

Jordan Bayles edited this page May 5, 2026 · 2 revisions

General

I have an old compiler/platform. Do I need C++11?

We are switching to C++11 only. However, our old code still works on older compilers. See the 0.y.z branch, which is in maintenance-only mode.

How do I write into array values?

See this discussion thread.

How do I fix the locale for skipping commas in numbers?

You need to set the locale to POSIX:

setlocale(LC_NUMERIC, "POSIX");

This should be done after any other locale changes. For more context, see this StackOverflow post.

How can I get stricter JSON parsing?

With modern versions of the library, use the CharReaderBuilder settings:

Json::CharReaderBuilder builder;
Json::CharReaderBuilder::strictMode(&builder.settings_);

See Issue #39 for more history.

Why has the formatting changed to write a single value per line?

You likely need to set commentStyle to "None". See Issue #181.

How do I get rid of newlines?

If you set the indentation to an empty string (""), newlines will also be omitted from the output.

How can I walk through keys and compare values?

Check out these examples:

How can I query a webpage that returns JSON and parse the results?

Here is a code sample using libcurl for HTTP functionality.

Where can I find prebuilt binaries?

See Issue #236.

Project

Where are the API docs?

They are hosted in a separate repository to keep the main repository lightweight:

Are you up-to-date with Chromium patches?

We aim to be as synchronized as possible with the version vendored in Chromium.

Where are older questions and issues?

Windows

error: ambiguous overload for operator[] in Json::Value

This is a known issue on some Windows compilers. See this discussion for more details.

amalgamate.py does not work on Windows console

The shebang at the top of the file might prevent Windows from running it correctly. You can run it explicitly with the Python launcher:

py amalgamate.py

Other Platforms

How do I cross-compile for ARM?

Refer to the ideas discussed in Issue #243.

Clone this wiki locally