(check-encoding value)encodes and decodes the provided value and returns a map of debugging info:
:equal - indicates if the decoded value is equal to the initial value :initial - the supplied value before encoding :decoded - the value after it has been decoded :encoded - the encoded (string) representation of the value
encodes and decodes the provided `value` and returns a map of debugging info: :equal - indicates if the decoded value is equal to the initial value :initial - the supplied value before encoding :decoded - the value after it has been decoded :encoded - the encoded (string) representation of the value
(defpathtype [hex-code & types] encoder decoder)defines an encoder and decoder for values of the given types
hex-code - a numeric code specifying a character to identify the type.
0x0 is used internally and is forbidden.
types - the types to be encoded (generally there should only be one)
encoder - a function which takes elements of the types specified in types and
returns a string representation
decoder - a function which takes the string reprensentations generated by the
encoder and reconstructs a value of the appropriate type
Note: do not overwrite existing hex-code and type assignments.
to get lists of types and hex-codes in use call encoding-assignments
defines an `encoder` and `decoder` for values of the given `types`
`hex-code` - a numeric code specifying a character to identify the type.
0x0 is used internally and is forbidden.
`types` - the types to be encoded (generally there should only be one)
`encoder` - a function which takes elements of the types specified in `types` and
returns a string representation
`decoder` - a function which takes the string reprensentations generated by the
encoder and reconstructs a value of the appropriate type
Note: do not overwrite existing hex-code and type assignments.
to get lists of types and hex-codes in use call `encoding-assignments`(encoding-assignments)fetches a map of types and the string representation of hex-codes presently assigned to encoders and decoders
fetches a map of types and the string representation of hex-codes presently assigned to encoders and decoders
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |