Skip to content

Properties with special characters in name are not marshalled/unmarshalled correctly #13

@joelittlejohn

Description

@joelittlejohn

Original author: joelittl...@gmail.com (February 22, 2011 15:08:50)

What steps will reproduce the problem?

  1. Create a schema that has a property with a special character in the name (i.e. a character that is not allowed in a java identifier name) e.g. my-special-property (special character here is hyphen)
  2. Generate Java types for this schema
  3. Try marshalling/unmarshalling using Jackson

What is the expected output?
Values for this property should be marshalled/unmarshalled correctly.

What do you see instead?
Java Bean property is 'my_special_property' (getMy_special_property, setMy_special_property) which is good, but marshalling to json produces the wrong property name (my_special_property instead of my-special-property) and unmarshalling from json always treats values as additionalProperties.

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=13

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions