You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.
YAML is easier for humans to write and less error prone than JSON.
The goal is to write job descriptors in YAML instead of JSON. For example:
---
id: 1name: my first jobclass: org.mycompany.jobs.MyFirstJobmethod: doWork
---
id: 2name: my second jobclass: org.mycompany.jobs.MySecondJobmethod: doWork
The text was updated successfully, but these errors were encountered:
Looks like jackson does not support deserializing multiple yaml documents: https://stackoverflow.com/questions/25222327/deserialize-pojos-from-multiple-yaml-documents-in-a-single-file-in-jackson
So we use snakeyaml directly (which is used behind the scene by jackson).
This commit uses default snakeyaml configuration. We may use a custom contructor "new Yaml(new Constructor(JobDefinition.class))" but due to 'clazz' attribute in JobDefinition, snakeyaml is unable to deserialize objects (class is reserved word and can't have java bean convention with getter/setter with string type..)
We want to have 'class' attribute in the yaml file instead of 'clazz'. Another option is to use 'type' attribute in the yaml file (and in JobDefinition class) but 'class' is better
fmbenhassine
changed the title
Use YAML in job descriptor
Use YAML in jobs descriptor
Jun 28, 2017
YAML is easier for humans to write and less error prone than JSON.
The goal is to write job descriptors in YAML instead of JSON. For example:
The text was updated successfully, but these errors were encountered: