Valid JSON, invalid action

Does a well-formed action satisfy your contract?

Make your own investigation

Author a schema and permission policy. Test a valid action, extra field, wrong type and unauthorised action.

Parse JSON; validate required fields, exact types, range, extra fields and an independent action allowlist.

Case cards

Cut these cards apart. Use the original example first, then let a partner supply a changed case. Keep sealed/final cards with the teacher until the learner commits a rule.

Case 1

Action JSON: {"action": "read", "duration": 10}

My prediction and reason:

Case 2

Action JSON: {"action": "send", "duration": 10}

My prediction and reason:

Case 3

Action JSON: {"action": "read", "duration": "ten"}

My prediction and reason:

Case 4

Action JSON: {"action": "read", "duration": 10, "extra": true}

My prediction and reason:

What this cannot establish

This is a small explicitly declared schema, not a complete JSON Schema implementation.