Make the JSON module work better in the absence of an application context