Skip to main content

to_indexable_string

Function to_indexable_string 

Source
pub fn to_indexable_string(v: &Value) -> String
Expand description

Encode a JSON value into a string that sorts lexicographically in CouchDB collation order. Used as keys in the storage engine.

Format:

  • Null: "1"
  • Bool: "2F" / "2T"
  • Number: "3" + encoded number
  • String: "4" + string value
  • Array: "5" + encoded elements separated by null byte
  • Object: "6" + encoded key-value pairs