class ChefCLI::PolicyfileLock
def canonicalize(attributes)
Recursive, so absurd nesting levels could cause a SystemError. Invalid
IEEE 754-2008
numerics should be in range [-(2**53)+1, (2**53)-1] to comply with
- +/- Infinity and NaN are banned, but float/numeric size aren't checked.
IEEE 754-2008 binary64 (double precision) numbers.
- We allow floats that fit within the range/precision requirements of
- String encoding stuff isn't normalized
In particular:
http://wiki.laptop.org/go/Canonical_JSON but not quite as strict, yet.
Generates a canonical JSON representation of the attributes. Based on
def canonicalize(attributes) unless attributes.is_a?(Hash) raise "Top level attributes must be a Hash (you gave: #{attributes})" end canonicalize_elements(attributes) end