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

feat: add support for custom ReflectType encoder #1039

Merged
merged 8 commits into from Dec 15, 2021

Commits on Dec 14, 2021

  1. Copy the full SHA
    f9e2251 View commit details
    Browse the repository at this point in the history
  2. add license

    psrajat committed Dec 14, 2021
    Copy the full SHA
    ba0bbf8 View commit details
    Browse the repository at this point in the history
  3. Add Tests

    * fix comments
    * don't export default ReflectedEncoder fn
    * move newReflectEncoder nil check to NewJsonEncoder()
    psrajat committed Dec 14, 2021
    Copy the full SHA
    ce7215a View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    31bc967 View commit details
    Browse the repository at this point in the history
  5. defaultReflectedEncoder: Drop closure and wrapper type

    The defaultReflectedEncoder function can satisfy the signature for
    `NewReflectedEncoder`, so we don't need to return a closure.
    
    And the returned `json.Encoder` matches the ReflectedEncoder interface
    so we don't need the wrapper type either.
    abhinav committed Dec 14, 2021
    Copy the full SHA
    3babc29 View commit details
    Browse the repository at this point in the history
  6. test/assertOutput: Use NewJSONEncoder to instantiate

    assertOutput manually sets up a jsonEncoder.
    This means that any config initalization we do in the constructor has to
    be replicated in assertOutput.
    Instead, use the constructor and cast to `*jsonEncoder`.
    abhinav committed Dec 14, 2021
    Copy the full SHA
    17016b9 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2021

  1. Rename TestJSONCustomReflectionEncoder

    Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com>
    abhinav and sywhang committed Dec 15, 2021
    Copy the full SHA
    bd74de7 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    c65627f View commit details
    Browse the repository at this point in the history