Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Force selected strings to marshal as string enclosed with double quotes #556

@sachintaksande

Description

@sachintaksande

Hello, I have a requirement where a mapping with key "key" and value as string like 12:34 should be marshalled as key: "12.34". I searched for all possible documentation but could not find it. Could you please suggest how to implement this requirement. What I tried while debugging is changing the value of "canUsePlain" in encode.go at runtime to false and it worked as expected. But there is no certain way to enforce this behavior for a selected property that I could find.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions