Echo json output instead of returning it