Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions ipa/general/0130.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
id: 130
state: experimental

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mark this as experimental or adopt? The proposed behavior is well established: if a resource returns JSON, it must not encode nested JSON as a string.

---

# IPA-130: Dynamic Content Fields

@wtrocki wtrocki Jun 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The challenge we've seen is that String fields were used instead of object (any) fields. This means the IPA als clarifying how we handle unstructured data — using objects rather than strings. Focusing on that in summary instead of what not to use (strings) might lead to more clarity


Resource properties sometimes hold a JSON value — configuration objects,
filters, metadata, templated payloads. Modeling such a property as a string
containing the serialized JSON pushes serialization concerns onto clients and
invites round-trip drift, because servers routinely normalize the JSON
(whitespace, key ordering, reformatting of nested structures). Declarative
clients then interpret the representation-level difference as state drift.

## Guidance

- Properties whose value is JSON **must** be modeled as a JSON object in
requests and responses — never as a string holding the serialized form.
- When the JSON has a well-defined schema, the API **must** model that schema in
the resource definition. Clients, documentation, and tooling benefit from
knowing the shape of the content.
- When the JSON is genuinely dynamic (arbitrary client-provided keys and
values), the property can be modeled as an object with dynamic keys.
Comment on lines +22 to +23

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- When the JSON is genuinely dynamic (arbitrary client-provided keys and
values), the property can be modeled as an object with dynamic keys.
- When the JSON is genuinely dynamic (arbitrary client-provided keys and values), the property **may** be modeled as an object with dynamic keys.