What does result_options::value do in json_query()? #613
-
|
It's either not documented at all or I missed something somewhere. The ambiguous name doesn't help either. I was hoping it would return pure value, e.g. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Nothing :-)
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 even Jayway added an option for returning a list. |
Beta Was this translation helpful? Give feedback.
Nothing :-)
result_optionsis a bitmask type,result_options::valueis 0, so or-ing it with any other options has no effect. By itself,result_options::valueis the same asresult_options{}, which are the default options (with none set.)result_options::valuewas left in for backwards compatibility from the time when we had two enum options:valueandpath.valuewas always the default - return a list of JSON values.pathcould 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 …