11-26-2023 11:21 AM
Newer version with improved info about a validation failure:
11-28-2023 03:24 AM
11-28-2023 01:44 PM
The "enum" keyword should work: https://json-schema.org/understanding-json-schema/reference/enum
01-25-2024 04:54 AM - edited 01-25-2024 04:57 AM
Hi,
I discovered this bug with unnamed variant if it is a void variant (empty as null) using fiunction 'To JSON text.vim':
AS you can see in the output, the "testVariant" name is not displayed in the JSON data output!
Discovered using v1.8.2.122 and 1.8.1.121
BR,
Davy
03-06-2024 07:39 AM
Hi James,
I would be very interested in the "Generate JSON Schema from LV Datatype" subvi.
In the application we want to use JSON as data input to a kind of dynamic actor which defines the type of actor (load a class) and then provides parameters to the class. The JSON Schema would be generated from a cluster which is part of the class.
A higher level web service could then also use the schema to build dynamic UIs (JSON Forms) which automatically also validate any entered data.
In addition to the cluster names, types and enum values, the min and max values from the data entry evaluation for numbers would also be great in order to define limits for numeric parameters.
Thanks for the great library!
05-13-2024 04:19 AM - edited 05-13-2024 04:28 AM
Just found a (IMHO) bug in with the validation:
Seems it doesn't honor const definitions in a schema
jsonvalidator.net finds this (see screenshot attached)
05-14-2024 03:22 PM
Can you give me a complete test case (JSON, and schema that improperly passes)? I have not been able to reproduce.
05-15-2024 06:23 AM
I'll PM the files to you
05-17-2024 12:26 PM
Looking at your Schema, the problem is that JSONtext doesn't (yet) support the Referencing with the "$ref" keyword. So that "const" in the "$ref" gets ignored.
Unfortunately, JSON Schema has a very large specification that I don't have the bandwidth to support. Sorry.
05-20-2024 10:02 AM
Hi James,
thanks for checking. Thanks for your support!
Oli