Switch to using json_encode() for building output