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_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 asresult_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
andpath
.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 …