Table of Contents

R101839-1 Object - Additional Data JSON Validation

Code R101839-1
Entity Systems.Core.ExtensibleDataObjects
Name AdditionalDataJson_Json
Attribute AdditionalDataJson
Layer Back-End
Events Commit
Record State Inserted, Updated
Priority Normal
Modify NO
Applicable Legislations ALL // no condition needed
Action Validate that:

AdditionalDataJson is NULL, is empty, or contains a single valid JSON value whose root element is an object.
Description The attribute holds the custom or optional attributes of an object, where every application or service keeps its own data under a separate top-level key. A root object is required so that an application can read its own key and preserve the keys owned by the others.

Values whose root is not an object are rejected - an array, a number, a quoted string, null or true - as is text which follows an otherwise valid object.

The attribute is delay loaded, so the rule validates the value only in the saves which set it. The stored value is not read from the database on every commit of the object.
Message Attribute 'Object.Additional Data JSON' has invalid value. The value must be a valid JSON object.
Version Introduced: v.27.1
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.