]> thyrsus.com Git - microjson.git/commitdiff
Documentation polishing.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 23 Sep 2014 22:18:41 +0000 (18:18 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 23 Sep 2014 22:18:41 +0000 (18:18 -0400)
microjson.asc

index a400cf353af1c998449fe42e80f696006dc30c80..df67faff3781ed84c1aef1ebceb75f1b80ad20a5 100644 (file)
@@ -157,13 +157,17 @@ when the JSON object does not contain the corresponding attribute.
 You can turn off this defaulting behavior by setting the +nodefault+
 member to +true+.
 
-Additionally, an +json_attr_t+ instance with a +t_integer+ or
-+t_uinteger+ type field can point at a map (an array of +json_enum_t+
-structures) that lists names and pairs of integral values.  If this is
-done, the parser expects the values of the JSON attribute to be strings but 
-internally maps them to corresponding integer values beore setting the
-target storage. An un-enumerated string value causes the parse to
-error out.
+=== Enumerated-value types ===
+
+The parser includes support for string attributes with controlled 
+vocabularies.
+
+A +json_attr_t+ instance with a +t_integer+ or +t_uinteger+ type field
+can point at a map (an array of +json_enum_t+ structures) that lists
+names and pairs of integral values.  If this is done, the parser
+expects the values of the JSON attribute to be strings but internally
+maps them to corresponding integer values before setting the target
+storage. An un-enumerated string value causes the parse to error out.
 
 (Case 8 in the unit tet source code illistrates how to use this feature.)