Browse Source

jansson Add explaination of error handling.

The pvar remains unchanged if the key/path is not found. Any previous
value remains, and it's not reset to a default value or NULL.
Olle E. Johansson 10 years ago
parent
commit
2471d1db57
2 changed files with 6 additions and 2 deletions
  1. 3 1
      modules/jansson/README
  2. 3 1
      modules/jansson/doc/jansson_admin.xml

+ 3 - 1
modules/jansson/README

@@ -111,7 +111,9 @@ Chapter 1. Admin Guide
    foo.bar[0][1].baz).
 
    The function can put a string, integer, null, or new json string into
-   destination.
+   destination. If the key/path can't be found in the JSON data structure,
+   the pvar is not changed. If it had a previous value, that value remains
+   unchanged.
 
    Example 1.1. jansson_get usage
 ...

+ 3 - 1
modules/jansson/doc/jansson_admin.xml

@@ -67,13 +67,15 @@
             <function moreinfo="none">jansson_get(key/path, src, dst)</function>
         </title>
         <para>
-            Copy the value at the location 'path' from the json object 'src' and store it in pvar 'dst'.
+            Copy the value at the location 'path' from the json object 'src' and store it in pvar 'dst'. 
         </para>
         <para>
             The path string supports dot delimited notation (e.g. foo.bar.baz), array notation (e.g. [0]), or a combination of the two (e.g. foo.bar[0][1].baz).
         </para>
         <para>
             The function can put a string, integer, null, or new json string into destination.
+ 	    If the key/path can't be found in the JSON data structure, the pvar is not changed. If it had a previous
+	    value, that value remains unchanged.
         </para>
         <example>
         <title><function>jansson_get</function> usage</title>