Skip to content

Commit

Permalink
docs(vrl): Add parse_cbor vrl function documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MiracleWisp authored and Semyon Uchvatov committed Dec 25, 2024
1 parent 029a2ff commit ca737fa
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bytesize
califrag
califragilistic
CAROOT
CBOR
cbor
cddl
cdylib
cef
Expand Down
36 changes: 36 additions & 0 deletions website/cue/reference/remap/functions/parse_cbor.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package metadata

remap: functions: parse_json: {
category: "Parse"
description: """
Parses the `value` as CBOR.
"""
notices: [
"""
Only CBOR types are returned.
""",
]

arguments: [
{
name: "value"
description: "The CBOR payload to parse."
required: true
type: ["string"]
},
]
internal_failure_reasons: [
"`value` is not a valid CBOR-formatted payload.",
]
return: types: ["boolean", "integer", "float", "string", "object", "array", "null"]

examples: [
{
title: "Parse CBOR"
source: #"""
parse_cbor!(decode_base64!("oWVmaWVsZGV2YWx1ZQ=="))
"""#
return: field: "value"
},
]
}

0 comments on commit ca737fa

Please sign in to comment.