appc/spec — pull request #66 by sgotti (2014-12-22 14:59:20+00:00)
Title: schema: add omitempty json tag option to optional types.

On Marshal empty types will be omitted instead of creating a lot of
"type": null json objects.

Example.
Before:
{
"acKind": "ImageManifest",
"acVersion": "0.1.1",
"name": "example.com/test",
"dependencies": [
{
"app": "example.com/test02",
"imageID": "sha512-c98bf6328037ba1272e2a36142405835ced3e44504e39eb9d02f64f59f598790",
"labels": null
}
],
"labels": null,
"pathWhitelist": null
"annotations": null,
}

After:
{
"acKind": "ImageManifest",
"acVersion": "0.1.1",
"name": "example.com/test",
"dependencies": [
{
"app": "example.com/test02",
"imageID": "sha512-c98bf6328037ba1272e2a36142405835ced3e44504e39eb9d02f64f59f598790"
}
]
}