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

fix serialiser #108

Merged
merged 5 commits into from
Feb 25, 2025
Merged

fix serialiser #108

merged 5 commits into from
Feb 25, 2025

Conversation

kennedymwavu
Copy link
Contributor

closes #107

  1. pass ... from res$json() to the serialiser.
  2. allow default serialiser to accept the ... from res$json() as either:
    • a single list named opts ie.

      res$json(..., opts = list(optionA = "some value", optionB = "another value"))
    • key=value pairs ie.

      res$json(..., optionA = "some value", optionB = "another value")
    • if both opts & key=value pairs are supplied, the key=value pairs should override any value with the same key/name in opts. this is in line with the docs of yyjsonr::write_json_str() which state this:

      Arguments:
      
             x: the object to be encoded
      
          opts: Named list of serialization options. Usually created by
                ‘opts_write_json()’
      
           ...: Other named options can be used to override any options in
                ‘opts’. The valid named options are identical to arguments to
                ‘opts_write_json()’
      
  3. add more descriptions, examples, & tests for the serialiser.
  4. fix a failing test for the Response class.

@kennedymwavu kennedymwavu linked an issue Feb 24, 2025 that may be closed by this pull request
@JohnCoene JohnCoene merged commit 8c7072d into master Feb 25, 2025
5 of 8 checks passed
@JohnCoene
Copy link
Collaborator

Thanks!

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.

fix serialiser
2 participants