make compatible with json objects