Source/Packages

Data.JSONRender

packages/foundation/standard/src/Data/JSONRender.alpha

669 lines45 declarations25.9 KiBSHA-256 62bf45d6adaa

def · lines 165–191

jsonRenderStringFragment

Full file
165def jsonRenderStringFragment =
166  (lambda unrestricted input : Bytes .
167    (eliminate
168      UTF8DecodeResult
169      (lambda unrestricted current : (family UTF8DecodeResult) . (family JSONRenderFragment))
170      (decodeUTF8 input)
171      (branch
172        UTF8DecodeSucceeded
173        codepoints
174        .
175        (constructor
176          JSONRenderFragment
177          JSONRenderFragmentSucceeded
178          (constructor JSONRenderKind JSONRenderValueKind)
179          (bytes-builder-append
180            (bytes-builder-chunk b"\"")
181            (bytes-builder-append (jsonRenderEscapedBuilder input) (bytes-builder-chunk b"\"")))
182          (succ zero)))
183      (branch
184        UTF8DecodeFailed
185        code
186        offset
187        .
188        (constructor
189          JSONRenderFragment
190          JSONRenderFragmentFailed
191          (constructor JSONErrorCode JSONInvalidUTF8)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.