Change raw boolean return to JSON object