Added JSON encoding and raised version requirements to 5.4