Method encode_value_canonic()
- Method
encode_value_canonic
string(8bit)
encode_value_canonic(mixed
value
,object
|void
codec
)
string(8bit)
encode_value_canonic(mixed
value
,object
|void
codec
,String.buffer
trace
)
string(8bit)
encode_value_canonic(mixed
value
,object
|void
codec
,int(0..)
debug
)- Description
Code a value into a string on canonical form.
- Parameter
value
Value to encode.
- Parameter
codec
Codec to use when encoding objects and programs.
- Parameter
trace
String.Buffer to contain a readable dump of the value.
- Parameter
debug
Debug level. Only available when the runtime has been compiled --with-rtl-debug.
Takes a value and converts it to a string on canonical form, much like encode_value(). The canonical form means that if an identical value is encoded, it will produce exactly the same string again, even if it's done at a later time and/or in another Pike process. The produced string is compatible with decode_value().
- Note
Note that this function is more restrictive than encode_value() with respect to the types of values it can encode. It will throw an error if it can't encode to a canonical form.
- See also