dart-json-mapper icon indicating copy to clipboard operation
dart-json-mapper copied to clipboard

Introduce `raw` attribute to `@JsonProperty` meta

Open k-paxian opened this issue 4 years ago • 0 comments

@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 avatar May 11 '21 19:05 k-paxian