public static Expression decodeJson ( JsonObject json ) { char [ ] encoded = JsonStringEncoder . getInstance ( ) . quoteAsString ( json . toString ( ) ) ; return x ( "DECODE_JSON(\"" + new String ( encoded ) + "\")" ) ; }
The returned Expression unmarshals the JSON constant into a N1QL value . The empty string results in MISSING .