TypeSafeSDK.JSON (TypeSafeSDK v0.2.0)

Copy Markdown View Source

JSON normalization for the semantic API, with collision detection and bounded nesting.

Objects accept atom/string keys, but values must be JSON values. Arbitrary structs, PIDs and functions are rejected. Nothing received from the service is turned into atoms.

Summary

Functions

normalize(value, path \\ [])

@spec normalize(term(), [String.t()]) ::
  {:ok, term()} | {:error, TypeSafeSDK.Error.t()}