Skip to content

What does result_options::value do in json_query()? #613

Answered by danielaparker
Destroy666x asked this question in Q&A
Discussion options

You must be logged in to vote

Nothing :-)

result_options is a bitmask type, result_options::value is 0, so or-ing it with any other options has no effect. By itself, result_options::value is the same as result_options{}, which are the default options (with none set.)

result_options::value was left in for backwards compatibility from the time when we had two enum options: value and path. value was always the default - return a list of JSON values. path could be chosen to select a list of normalized paths instead.

jsoncons jsonpath, following the original Goessner JSONPath, has always returned a list of values (or normalized paths.) Today most implementations do that, with Jayway JSONPath being a notable exception. But …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Destroy666x
Comment options

@danielaparker
Comment options

Answer selected by Destroy666x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants