How to control the format of associations in a JSON response
- Last Updated: July 16, 2025
- 1 minute read
- Corticon
- Version 6.3
- Documentation
Associations in JSON responses are, by default, expressed as a
JSONArray. You can control the format of 1-1 associations in JSON responses by setting
the property:
com.corticon.server.execution.json.association.singleton=JSONObjectin
the brms.properties on the machine where the JSON
requests are processed. When this property is set, and when a Rule alters a 1-1
association through an = (equals) operator, the entity
being assigned to the association will be expressed as a JSONObject, rather than an
entity inside a JSONArray in the JSON response. This property will not unconditionally
change 1-1 Associations from a JSONArray to a JSONObject in the JSON response. Changing
from a JSONArray to a JSONObject will only occur when a Rule fires to alter the contents
of an Association.