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

Introduce raw attribute to @JsonProperty meta #130

Open
k-paxian opened this issue May 11, 2021 · 0 comments
Open

Introduce raw attribute to @JsonProperty meta #130

k-paxian opened this issue May 11, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request sponsorware https://calebporzio.com/sponsorware

Comments

@k-paxian
Copy link
Owner

k-paxian commented May 11, 2021

@jsonSerializable
class RawBean {
    String? name;

    @JsonProperty(raw: true)
    String? json;

    RawBean(this.name, this.json);
}

final bean = RawBean('My bean', '{"attr":false}');

should produce:

{
    "name":"My bean",
    "json":{
        "attr":false
    }
}

inspired by this

@k-paxian k-paxian added enhancement New feature or request sponsorware https://calebporzio.com/sponsorware labels May 11, 2021
@k-paxian k-paxian self-assigned this May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sponsorware https://calebporzio.com/sponsorware
Projects
None yet
Development

No branches or pull requests

1 participant