Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbris/jackson-data-models-example
Demonstration of Jackson data models
https://github.com/jbris/jackson-data-models-example
annotation annotations data-model data-model-tools data-modeling data-modelling data-models data-validation iris-dataset jackson jackson-annotation jackson-core jackson-databind jackson-json jackson-json-processor jackson-module json-schema json-schema-definitions json-schema-generator metadata
Last synced: about 9 hours ago
JSON representation
Demonstration of Jackson data models
- Host: GitHub
- URL: https://github.com/jbris/jackson-data-models-example
- Owner: JBris
- License: apache-2.0
- Created: 2024-11-03T22:49:36.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-04T23:17:13.000Z (2 months ago)
- Last Synced: 2024-11-13T08:33:05.803Z (2 months ago)
- Topics: annotation, annotations, data-model, data-model-tools, data-modeling, data-modelling, data-models, data-validation, iris-dataset, jackson, jackson-annotation, jackson-core, jackson-databind, jackson-json, jackson-json-processor, jackson-module, json-schema, json-schema-definitions, json-schema-generator, metadata
- Language: Java
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jackson-data-models-example
Demonstration of Jackson data models
## Instructions
Install Java and Maven:
```
sudo apt-get install -y openjdk-17-jdk maven
```Run the code:
```
cd modelling
mvn clean compile assembly:single -X -e
java -jar target/modelling-1.0-SNAPSHOT-jar-with-dependencies.jar
```## Expected output
```
JSON
{
"type" : "object",
"id" : "urn:jsonschema:com:data:example:model:Iris",
"properties" : {
"id" : {
"type" : "integer",
"required" : true,
"description" : "The unique identifier",
"minimum" : 0.0,
"name" : "id",
"propertyType" : "id",
"defaultValue" : 0.0,
"tags" : [ "example_tag", "another_tag" ]
},
"sepal_length" : {
"type" : "number",
"required" : true,
"description" : "The flower sepal length",
"maximum" : 100.0,
"minimum" : 0.0,
"name" : "sepal_length",
"unit" : "cm",
"propertyType" : "state_variable",
"defaultValue" : 0.0,
"tags" : [ "example_tag", "another_tag" ]
},
"sepal_width" : {
"type" : "number",
"required" : true,
"description" : "The flower sepal width",
"maximum" : 100.0,
"minimum" : 0.0,
"name" : "sepal_width",
"unit" : "cm",
"propertyType" : "state_variable",
"defaultValue" : 0.0,
"tags" : [ "example_tag", "another_tag" ]
},
"petal_length" : {
"type" : "number",
"required" : true,
"description" : "The flower petal length",
"maximum" : 300.0,
"minimum" : 0.0,
"name" : "petal_length",
"unit" : "cm",
"propertyType" : "state_variable",
"defaultValue" : 0.0,
"tags" : [ "example_tag", "another_tag" ]
},
"petal_width" : {
"type" : "number",
"required" : true,
"description" : "The flower petal width",
"maximum" : 300.0,
"minimum" : 0.0,
"name" : "petal_width",
"unit" : "cm",
"propertyType" : "state_variable",
"defaultValue" : 0.0,
"tags" : [ "example_tag", "another_tag" ]
}
}
}
CSV
id,sepal_length,sepal_width,petal_length,petal_width
0,1.0,2.0,3.0,4.0
1,2.0,3.0,4.0,5.0
2,3.0,4.0,5.0,6.0
3,4.0,5.0,6.0,7.0
4,5.0,6.0,7.0,8.0
5,6.0,7.0,8.0,9.0
6,7.0,8.0,9.0,10.0
7,8.0,9.0,10.0,11.0
8,9.0,10.0,11.0,12.0
9,10.0,11.0,12.0,13.0
10,11.0,12.0,13.0,14.0
```