Aeson-like JSON parsing and encoding for PS