fixed bug in json sample