Added read/write of FormDefinition JSON
Merge from upstream