pickling icon indicating copy to clipboard operation
pickling copied to clipboard

Use under_scores instead of CamelCase

Open crumbpicker opened this issue 11 years ago • 2 comments

Jackson allows to use custom naming strategies. It implements the CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES strategy as a builtin (http://jackson.codehaus.org/1.9.9/javadoc/org/codehaus/jackson/map/PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.html).

Is it possible to apply such custom strategies with pickling ?

crumbpicker avatar Sep 20 '13 21:09 crumbpicker

Here is a similar functionality implemented in the GSON library: https://sites.google.com/site/gson/gson-user-guide#TOC-JSON-Field-Naming-Support http://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/FieldNamingPolicy.html#LOWER_CASE_WITH_UNDERSCORES

Still any suggestion ?

crumbpicker avatar Sep 28 '13 13:09 crumbpicker

You could probably implement this with your own custom pickle format if you desired. I don't see us changing the included JSON implementation for this, but I'd see it as a simple extension if you'd like to implement it.

jsuereth avatar Aug 13 '15 19:08 jsuereth