Skip to content

Conversation

divyekapoor
Copy link

In several cases during the use of this library, I had weird output that I had to debug.

The root cause was almost always a JSONValue being created with a pointer argument instead of the dereferenced value. (The pointer was always being coerced into a boolean without a compile error).

This PR fixes this issue by making all the single argument constructors explicit.
In addition, the Makefile has been updated to support a test target.

This disallows implicit conversions of the form:

JSONValue(pointer) => JSONValue(bool)
JSONValue v = 23;

etc.

Tested: make test
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