Closed gryumov closed 3 months ago
Hi @rdavis120, I'm in the process of finalizing the feature for automatically renaming fields to snake case (Issue #12). What do you think about the API design for this feature?
using Serde
struct Foo1
first_field::Int64
second_field::String
end
Serde.@pascal_case(Foo1)
Serde.deser_json(
Foo1,
"{\"FirstField\":1,\"SecondField\":\"example\"}",
)
struct Foo2
first_field::Int64
second_field::String
end
Serde.@camel_case(Foo2)
Serde.deser_json(
Foo2,
"{\"firstField\":1,\"secondField\":\"example\"}",
)
struct Foo3
first_field::Int64
second_field::String
end
Serde.@kebab_case(Foo3)
julia> Serde.deser_json(
Foo3,
"{\"first-field\":1,\"second-field\":\"example\"}",
)
Foo3(1, "example")
Pull request checklist