JSON Validation?
Comments
-
[font=Calibri, sans-serif]Does Decisions do input JSON validation? Can this be enabled/disabled on a case-by-case basis?[/font]
-
[font=Roboto, Arial, Helvetica, sans-serif]If the JSON sent to a flow via POST is malformed, the flow itself will not notice it. There is a system default rule named Test JSON Is Valid that can validate JSON text, however. If the input of a flow is found to be invalid with this rule, its false path can have a Throw API Exception step send a response code and some specified error message - e.g. 400: invalid JSON: asdf. (FlowWithJSONValidation)[/font]
[font=Roboto, Arial, Helvetica, sans-serif]
[/font]
[font=Roboto, Arial, Helvetica, sans-serif]If you want to validate some inputs [i]but not all[/i], you can [/font]achieve this by adding steps to check on the values of all other fields in a JSON input except those that do not need to be validated. (ADifferentApproachToJSONValidation)I have attached two example flows for these cases.
Howdy, Stranger!
Categories
- 2.1K All Categories
- 18 General
- 155 Installation / Setup
- 991 Flows
- 86 Rules
- 203 Administration
- 204 Portal
- 433 General Q & A
- 600 Forms
- 282 Reports
- 3 Designer Extensions
- 38 Example Flows
- 32 CSS Examples
- 1 Diagram Tile
- 5 Javascript Controls
- 139 Pages
- 1 Process Mining
- New Features
- 150 Datastructures
- 50 Repository
- 169 Integrations
- 25 Multi-Tenant
- 21 SDK
- 40 Modules
- 38 Settings
- 20 Active Directory
- 12 Version 7
- 34 Version 8