bug json

18 views
Skip to first unread message

lin abc

unread,
Mar 15, 2023, 1:30:58 AM3/15/23
to cereal serialization library

bug.png

Erich Keane

unread,
Mar 15, 2023, 8:52:09 AM3/15/23
to cereal serialization library, lin abc
This isn't a bug, this is well documented.  The closing brace is only emitted to the stream when the archive is destructed.  In your first example, you do this correctly.  In the 2nd example, you are getting the string out of the stream on line 27, but the destructor isn't called until 31.

Line 33 doesn't print it of course, since you are just re-using a copy of the same string, as captured on line 27.

On Tuesday, March 14, 2023 at 10:31:00 PM PDT, lin abc <abc...@gmail.com> wrote:



bug.png

--
You received this message because you are subscribed to the Google Groups "cereal serialization library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cerealcpp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerealcpp/b2fd40a0-162f-4151-8d9c-9a64cc245d05n%40googlegroups.com.

lin abc

unread,
Mar 22, 2023, 7:05:55 PM3/22/23
to Erich Keane, cereal serialization library
Thank you for the clarification. 

Erich Keane <erich...@verizon.net> 于2023年3月15日周三 20:52写道:
Reply all
Reply to author
Forward
0 new messages