object to json, but weird output