code: public final Object encode(Val value) {
        if (value == null) {
           return null;
        }
        return encode(value.get());
     }
docs: Encodes a value into a Json writeable type (String or Number).
  
  @param value the value
  @return the encoded value