PocoAdapter using snake case handling tries to convert snake_case_name to snake case again and then fails to find the property.
NET8 has no explicit PascalCase naming policy which is default (null). The condition above returns just a name which is sanka_case_name as it was passed and then fails to find the property.
I have tried to create PascalCase naming policy myself. It works for path and we can find the target property but it leads to fail during value application which is snake_case as well.
Test works for case when path has PascalCase and value has snake_case though:
{op:"replace", path:"/NestedProperty", value:"{first_prop:1, second_prop:2}"}
We have truly snake_case API where client uses snake_case for both path and value. And it works with Newtonsoft. What is the best way to make it work with SystemText?
Here is the test describing true snake case approach using for both
path
and nested objectvalue
values.{op:"replace", path:"/nested_property", value:"{first_prop:1, second_prop:2}"}
PocoAdapter using snake case handling tries to convert
snake_case_name
to snake case again and then fails to find the property.NET8 has no explicit PascalCase naming policy which is default (null). The condition above returns just a name which is
sanka_case_name
as it was passed and then fails to find the property.I have tried to create PascalCase naming policy myself. It works for path and we can find the target property but it leads to fail during value application which is snake_case as well.
Test works for case when path has PascalCase and value has snake_case though:
{op:"replace", path:"/NestedProperty", value:"{first_prop:1, second_prop:2}"}
We have truly snake_case API where client uses snake_case for both path and value. And it works with Newtonsoft. What is the best way to make it work with SystemText?