Make API JSON compliant