json_serializable.dart icon indicating copy to clipboard operation
json_serializable.dart copied to clipboard

[Enhancement] more options for `FieldRename`

Open lucavenir opened this issue 3 months ago • 0 comments

Thank you for providing the FieldRename enum. It quickly helps for common conventions.

It's great, but some backends adopt some weird naming conventions. I recently had to interface my client towards a server that returns only lowercase json fields, e.g.

{
  "somevaluewithnocase": 9
}

The fact that this is even a thing is very much debatable, thus making this request kind-of low-priority, but I was wondering if we could add more options for FieldRename, like for this one, above.

One good and complete list might be the following from mason. As you can see, there, we're pretty much allowed to do anything (obviously, it's a completely different context, and indeed there's some overlap, but you get the general idea). https://docs.brickhub.dev/brick-syntax#built-in-lambdas

lucavenir avatar Mar 10 '24 15:03 lucavenir