decodeStrict/encodeStrict (TODO: make nicer)