small fix to testJSONEntityEncoding
fix writeEntity json schema