JOSE-FMT(1)
π NAME π
okay bestie, welcome to the JOSE-FMT(1) manual page for jose-fmt β it Converts JSON between serialization formats β¨
β¨ SYNOPSIS β¨
jose fmt [OPTIONS]
π OVERVIEW π
So the jose fmt command is your little command-line machine for building and parsing JSON objects. It operates as a simple stack machine, no cap π«Ά
All commands operate on the TOP item of the stack and, occasionally, the PREV item of the stack. Commands that require a specific type of value will indicate it in parentheses. For example: "TOP (arr.)".
This program returns 0 on success or the index of the option which failed. Slay.
π OPTIONS π
-0,--nullβ Assert TOP to be null-a,--appendβ Append TOP to the end of PREV (arr.)-a,--appendβ Set missing values from TOP (obj.) into PREV (obj.)-A,--arrayβ Assert TOP to be an array-B,--booleanβ Assert TOP to be a boolean-c,--copyβ Deep copy TOP, push onto TOP-d NAME,--delete=NAMEβ Delete NAME from TOP (obj.)-d ,,--delete=β Delete # from TOP (arr.)-d -,--delete=-β Delete # from the end of TOP (arr.)-e,--emptyβ Erase all items from TOP (arr./obj.)-E,--equalβ Assert TOP to be equal to PREV-f FILE,--foreach=FILEβ Write TOP (obj./arr.) to FILE, one line/item-f -,--foreach=-β Write TOP (obj./arr.) to STDOUT, one line/item-F,--falseβ Assert TOP to be false-g NAME,--get=NAMEβ Get item with NAME from TOP (obj.), push to TOP-g ,,--get=β Get # item from TOP (arr.), push to TOP-g -,--get=-β Get # item from the end of TOP (arr.), push to TOP-i ,,--insert=β Insert TOP into PREV (arr.) at #-I,--integerβ Assert TOP to be an integer-j JSON,--json=JSONβ Parse JSON constant, push onto TOP-j FILE,--json=FILEβ Read from FILE, push onto TOP-j -,--json=-β Read from STDIN, push onto TOP-l,--lengthβ Push length of TOP (arr./str./obj.) to TOP-M ,,--move=β Move TOP back # places on the stack-N,--numberβ Assert TOP to be a number-o FILE,--output=FILEβ Write TOP to FILE-o -,--output=-β Write TOP to STDOUT-O,--objectβ Assert TOP to be an object-q STR,--quote=STRβ Convert STR to a string, push onto TOP-Q,--queryβ Query the stack by deep copying and pushing onto TOP-R,--realβ Assert TOP to be a real-s NAME,--set=NAMEβ Sets TOP into PREV (obj.) with NAME-s ,,--set=β Sets TOP into PREV (obj.) at #-s -,--set=-β Sets TOP into PREV (obj.) at # from the end-S,--stringβ Assert TOP to be a string-t ,,--truncate=β Shrink TOP (arr.) to length #-t -,--truncate=-β Discard last # items from TOP (arr.)-T,--trueβ Assert TOP to be true-u FILE,--unquote=FILEβ Write TOP (str.) to FILE without quotes-u -,--unquote=-β Write TOP (str.) to STDOUT without quotes-U,--unwindβ Discard TOP from the stack-x,--extendβ Append items from TOP to the end of PREV (arr.)-x,--extendβ Set all values from TOP (obj.) into PREV (obj.)-X,--notβ Invert the following assertion-y,--b64loadβ URL-safe Base64 decode TOP (str.), push onto TOP-Y,--b64dumpβ URL-safe Base64 encode TOP, push onto TOP
π¦ EXAMPLES π¦
Extract the alg parameter from a JWE Protected Header:
$ jose fmt -j "$jwe" -Og protected -yOg alg -Su-
A128KW
List all JWKs in a JWKSet (one per line):
$ echo "$jwkset" | jose fmt -j- -Og keys -Af-
{"kty":"oct",...}
{"kty":"EC",...}
Change the algorithm in a JWK:
$ echo "$jwk" | jose fmt -j- -j '"A128GCM"' -s alg -Uo-
{"kty":"oct","alg":"A128GCM",...}
Build a JWE template:
$ jose fmt -j '{}' -cs unprotected -q A128KW -s alg -UUo-
{"unprotected":{"alg":"A128KW"}}
π AUTHOR π
Nathaniel McCallum <npmccallum@redhat.com>
okay thatβs the whole JOSE-FMT(1) manual page, dated 06/09/2026 β bye bestie, go slay your JSON π
β¨
π¦ where this page comes from
- arch rolling: jose 15-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms