joelittlejohn / jsonschema2pojo

Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc

Home Page:http://www.jsonschema2pojo.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to declare one field as Map?

zjffdu opened this issue · comments

I know in jsonschema2pojo additionalProperties is java Map, but how can I declare one specific field also as Map? e.g. I want the following field config to be a Map.

{
  "type":"object",
  "properties": {
    "config": {
        "type" : "string"
    }
  }
}

One option is to say: "existingJavaType": "java.util.Map<String,String>"