Migrating from 1.x
2.x reads 1.x, so you can move one service at a time.
What changed
| 1.x | 2.x | |
|---|---|---|
| Cell separator | | | , |
| Round trip | Changes some values (strings with |, empty objects) | Exact, for every JSON value |
| Column forms | None | Steps, prefixes, suffixes, dictionaries, constants, nested headers |
| Typed | !JDOGO/2 @mode TYPED with | rows | !JDOGO/2 @doc plus a document |
1.x 2.x @id,name,tags @id,name,tags 1|Ana|[a,b] 1,Ana,[a,b] 2|Bo|[] 2,Bo,[]
In 2.1, the defaults moved
dumps, stringify, the jdogo compact command and the HTTP middleware now write 2.x. Nothing to change if your readers use a current SDK: loads, parse, jdogo decode and the middleware read both versions.
If a reader can't upgrade yet
Keep writing 1.x for it explicitly:
jdogo.dumps(data, mode="v1")
stringify(data, "v1")
jdogo compact -m v1 data.json
format_jdogo_body(data, mode="v1") # formatJDogoBody(data, "v1") in TypeScript
Checklist
- Upgrade every reader to a 2.1 SDK. They accept 1.x and 2.x.
- Upgrade writers. Pin
"v1"only where an old reader remains. - Re-encode stored 1.x data if you need exact round trips for strings containing
|or for empty objects.