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

Support for application/json in the default serializer #27

Closed
dillonredding opened this issue Apr 25, 2023 · 0 comments · Fixed by #37
Closed

Support for application/json in the default serializer #27

dillonredding opened this issue Apr 25, 2023 · 0 comments · Fixed by #37
Assignees
Labels
enhancement New feature or request

Comments

@dillonredding
Copy link
Member

The default serializer could support serializing an Action with type 'application/json'. The resulting serialization would be a JSON object whose entries are the name-value pairs from each Field in the Action.

For example, these fields:

[
  { "name": "foo", "value": "bar" },
  { "name": "baz", "value": 42 },
  { "name": "qux", "value": true }
]

would serialize as:

{
  "foo": "bar",
  "baz": 42,
  "qux": true
}

Alternatively, the fields could simply be sent as is (as an array), but that scenario seems less desirable since the field's may contain a lot of metadata that the server does not need.

@dillonredding dillonredding added the enhancement New feature or request label Apr 25, 2023
dillonredding added a commit that referenced this issue Aug 14, 2023
Reorganize non-core types into separate folder.

Refactor `SerializeFn` to be generic.

Refactor default serializer internals to support JSON serializer.

Resolves #27
@dillonredding dillonredding self-assigned this Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant