Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[770] handle arrays of JSON-friendly objects #34

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

misaka
Copy link
Contributor

@misaka misaka commented Aug 1, 2022

We've previously added special handling to event data processing for objects that can be converted to JSON; this change expands that to handle an array of these objects that can be converted to JSON. Words are hard, a pictureJSON structure is worth a thousand words:

BEFORE BAD:

        {
          "key": "accrediting_provider_enrichments",
          "value": [
            {
              "UcasProviderCode": "N21",
              "Description": "",
              "validation_context": null,
              "errors": {
              }
            }
          ]
        }

NOW GOOD:

        {
          "key": "accrediting_provider_enrichments",
          "value": [
            "{\"UcasProviderCode\":\"N21\",\"Description\":\"\",\"validation_context\":null,\"errors\":{}}"
          ]
        }

(we now encode each element of the array to JSON).

This has change has also been tested in the test environment.

We've previously added special handling to event data processing for
objects that can be converted to JSON; this change expaands that to
handle an array of these objects that can be converted to JSON.
@misaka
Copy link
Contributor Author

misaka commented Aug 1, 2022

cc: @avinhurry for the assist

@misaka misaka merged commit 0cff6b7 into main Aug 2, 2022
@misaka misaka deleted the 770-handle-array-values-for-data branch August 2, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants