简体   繁体   English

jsonSchema2Pojo 如何使用 String 作为键和值生成 HashMap 作为使用模式生成的另一个 class

[英]jsonSchema2Pojo how to generate HashMap with String as key and value as another class generated using schema

I wanted to generate POJO classes from json schema, in which one of the attribute in the generated class should be a map of type - Map<String, List>.我想从 json 模式生成 POJO 类,其中生成的 class 中的属性之一应该是 map 类型 - Map<String, List>。 Here CustomClass should be a class generated using jsonnSchema2pojo plugin.这里的 CustomClass 应该是使用 jsonnSchema2pojo 插件生成的 class。

How do we achieve this in schema?我们如何在模式中实现这一点? How does the schema looks like?模式看起来如何?

Search for Extensions > javaType on https://www.jsonschema2pojo.org/ - And I am sure you can do that.https://www.jsonschema2pojo.org/上搜索 Extensions > javaType - 我相信你可以做到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从jsonschema2pojo生成的类生成的POJO不应该存在 - POJO generated from jsonschema2pojo generating class that should not exist 立即使用jsonschema2pojo生成的Class在代码中创建对象 - Using the jsonschema2pojo's generated Class instantly to create objects in the code 如何在 maven 的 POM 中更改由 jsonschema2pojo 生成的默认 OutputSchema.java 类名 - How to change default OutputSchema.java class name generated by jsonschema2pojo in maven's POM jsonschema2pojo 生成没有任何键值对的枚举 - jsonschema2pojo generating enum without any key value pairs 如何使用json模式或jsonschema2pojo将某些属性标记为已忽略? - How can I mark as ignored some properties using json schema or jsonschema2pojo? 无法使用jsonschema2pojo从json对象生成DateTime字段到java pojo? - Unable to generate DateTime field from json object to java pojo using jsonschema2pojo? jsonschema2pojo没有从json字符串生成pojo类 - jsonschema2pojo not generating pojo classes from json string Jsonschema2pojo错误,创建了类名为“ S”的对象列表 - Jsonschema2pojo error with creating a list of objects with class name as “S” 使用jsonschema2pojo转换可变长度值的枚举 - Converting enum of variable length values using jsonschema2pojo JSON 到 Pojo 转换器在线 jsonschema2pojo - JSON to Pojo Converter Online jsonschema2pojo
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM