diff options
Diffstat (limited to 'src/tests/modules/json/module.conf')
-rw-r--r-- | src/tests/modules/json/module.conf | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/src/tests/modules/json/module.conf b/src/tests/modules/json/module.conf new file mode 100644 index 0000000..04d1b1d --- /dev/null +++ b/src/tests/modules/json/module.conf @@ -0,0 +1,150 @@ +json { +} + + +# +# Output mode "object" +# + +json json_object { + encode { + output_mode = object + } +} + +json json_object_no { + encode { + output_mode = object + + value { + single_value_as_array = no + enum_as_integer = no + always_string = no + } + } +} + + +json json_object_ex { + encode { + output_mode = object + + attribute { + prefix = "pf" + } + + value { + single_value_as_array = yes + enum_as_integer = yes + always_string = yes + } + } +} + + +# +# Output mode "object_simple" +# + +json json_object_simple { + encode { + output_mode = object_simple + } +} + +json json_object_simple_ex { + encode { + output_mode = object_simple + + attribute { + prefix = "pf" + } + + value { + single_value_as_array = yes + enum_as_integer = yes + always_string = yes + } + } +} + + +# +# Output mode "array" +# + +json json_array { + encode { + output_mode = array + } +} + +json json_array_ex { + encode { + output_mode = array + + attribute { + prefix = "pf" + } + + value { + single_value_as_array = yes + enum_as_integer = yes + always_string = yes + } + } +} + + +# +# Output mode "array_of_names" +# + +json json_array_names { + encode { + output_mode = array_of_names + } +} + +json json_array_names_ex { + encode { + output_mode = array_of_names + + attribute { + prefix = "pf" + } + + value { + single_value_as_array = yes # not valid + enum_as_integer = yes # not valid + always_string = yes # not valid + } + } +} + + +# +# Output mode "array_of_values" +# + +json json_array_values { + encode { + output_mode = array_of_values + } +} + +json json_array_values_ex { + encode { + output_mode = array_of_values + + attribute { + prefix = "pf" # not valid + } + + value { + single_value_as_array = yes # not valid + enum_as_integer = yes + always_string = yes + } + } +} |