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

Simplify Default Field Serialization #17

Closed
dillonredding opened this issue Jan 26, 2023 · 0 comments · Fixed by #13
Closed

Simplify Default Field Serialization #17

dillonredding opened this issue Jan 26, 2023 · 0 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request

Comments

@dillonredding
Copy link
Member

In hindsight, borrowing from HTML's entry list construction and name-value pair conversion for serializing fields in action submission is overkill and introduces artifacts (e.g., newline normalization) that are likely only the result of HTML's historical baggage. I recommend this be simplified so that a Field's value is the thing sent to the server. Since value's type is parameterized, the serialization can be driven by that. For example, when type is date and value is a Date object, serialize to YYYY-MM-DD. When type is file, value should be of type File, or if multiple is set to true, it should be File[].

@dillonredding dillonredding added the enhancement New feature or request label Jan 26, 2023
@dillonredding dillonredding self-assigned this Jan 26, 2023
dillonredding added a commit that referenced this issue Mar 7, 2023
… Models (#13)

Remove `SirenClient` class in favor of top-level functions (see below).

Remove support for Node.js.

Add `follow`, `submit`, and `parse` functions.

Add TypeDoc for automated doc generation.

Absorb Siren element classes from `@siren-js/core`.

Simplify default serializer.

Resolves: #11, #12, #17
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