fix UnmarshalJSON
Merge branch 'add-json-functionality' into dev