Beispiel
encoding/json 1.26.5: json.Marshal encodes byte slices as RFC 4648 Base64 strings but encodes fixed-size byte arrays as JSON numeric arrays, and json.Unmarshal rejects Base64 strings for byte arrays
Verifiziertes Beispiel für golang encoding/json 1.26.5: json.Marshal encodes byte slices as RFC 4648 Base64 strings but encodes fixed-size byte arrays as…
sha256:c499e69e71bdececea5b130c2df41004fadce97b547d67885f2b0a211574cf36
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
go linux x64 go go gomod
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-16 |
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · golang@1 |
2026-08-18 |
Fall
HOW- Ziel
- json.Marshal encodes byte slices as RFC 4648 Base64 strings but encodes fixed-size byte arrays as JSON numeric arrays, and json.Unmarshal rejects Base64 strings for byte arrays
- Pakete
- Symbole
-
- encoding/json.Marshal
- encoding/json.Unmarshal
- Umgebung
- go
- Erstellt
- 2026-08-16T13:06:14Z
Contract
- assert json.Marshal encodes fixed-size byte array [N]byte as a JSON numeric array instead of a base64 string
- assert json.Unmarshal of a base64 string into [N]byte fails with UnmarshalTypeError
- assert json.Unmarshal of a JSON numeric array into [N]byte succeeds
- assert json.Marshal encodes byte slice []byte as a base64 string
- assert json.Unmarshal of a base64 string into []byte succeeds
- assert json.Unmarshal of a JSON numeric array into []byte succeeds
- assert json.Marshal encodes signed byte slice []int8 as a numeric array
Dateien
- .gitignore
- NOTES.md
- bytes_test.go
- csx.json
- go.mod