def add_field

bend-toon-codec@0.1.0.0 · src/frame.bend:103

import bend-toon-codec@0.1.0.0/src/frame.bend as Frame
import Base
import bend-toon-codec@0.1.0.0/src/json.bend as J

103# Add a field to a reversed field chain. A repeated key is an error in strict
104# mode; otherwise the later value replaces the earlier (section 14.4).
105def add_field(+strict: Bool, +fs: J.Json, +k: String, +v: J.Json) -> Result<&2, &2, String, J.Json>:
106  add.if(has_key(k, fs), strict, k, v, fs)

Uses (6)

Used by (1)