google / google/built_value.dart
Serialize BuiltMap<String, Object> without internal discriminators
Open
- Dominant language
- Dart
- Stars
- 886
- Forks
- 195
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 4
Description
I have an object that holds a BuitMap (data) that contains non nested standard json key values pairs of different types _( int, float, (built)list, string)_.
```
data = {
"foo": "bar",
"baz": 1.2
}.build();
```
The trouble is that if this gets serialized, the results have the **$** discriminator added. _(The data coming from the backend also does not have any discriminators.)_
```{... , "data": {"bar": {"$": "String", : "baz"}, "foo": {"$": "int", : 1}}}```
This doesn't play nice with the backend. How can i resolve this?
Contributor guide
Assessment
This issue has not been assessed yet.