Skip to content

Commit

Permalink
Restore the runnable example in STON class>>#toJsonString:
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Van Caekenberghe committed Mar 16, 2023
1 parent f6e2ddd commit 5af627a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ toJsonString: object
"Return a String with the JSON serialization of object.
Note that the object graph can only contain lists (Array) and maps (Dictionary)"

"STON toJsonString: { { #foo->1 } asDictionary. { #bar->2 } asDictionary }"
"(STON toJsonString: { { #foo->1 } asDictionary. { #bar->2 } asDictionary }) >>> '[{""foo"":1},{""bar"":2}]'"

^ String streamContents: [ :stream |
self put: object asJsonOnStream: stream ]

0 comments on commit 5af627a

Please sign in to comment.