Skip to content

Commit 82b358e

Browse files
authored
Update proposal.md
1 parent 97c8249 commit 82b358e

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

cppcon2025/proposal.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@
44
For example, "My Adventures With Boost.Asio: return to Sender"*
55

66

7+
Reflection-based JSON in C++ at Gigabytes per Second
8+
79
## Abstract
810

911
*As it should appear in the program. About one to three paragraphs. This is your pitch to both the Program Committee and to potential attendees about why they should see your presentation. (Use the 'Comments' field below for remarks intended only for the PC.)
1012
Try to answer the reader's questions, What will I learn? and Why is this important to me? To facilitate a double-blind review process, please avoid statements that remove all uncertainty about who you are*
1113

14+
JSON, or JavaScript Object Notation, has become a cornerstone for storing and exchanging data. Its appeal lies in its simplicity—human-readable text that elegantly captures structured data through attribute-value pairs and arrays: {"age": 5, "name": "Daniel", "toys": ["wooden dog", "little car"]}. JSON is intuitive yet powerful. But ingesting and producing JSON can turn into a performance choke point. In C++, it can be a tedious, error-prone task. Programmers wrestle with unexpected content, manually mapping data to and from native structures, all while striving for speed and safety.
15+
16+
With languages like Java, C#, Zig, Rust, or Python, JSON serialization and deserialization typically requires far less work. In particular, Rust's serde library blends convenience with high speed. We wish for a C++ library to automatically handle JSON production and consumption, seamlessly tied to native data structures. It is not merely to simplify life for developers; it is also about crafting code that is both fast and solid, generated at compile time by a battle-tested library.
17+
18+
Thankfully, C++ might soon be getting reflective metaprogramming. Leveraging the experimental Bloomberg LLVM fork with reflective metaprogramming, we have built a full-fledged implementation—complete with tests, benchmarks, and documentation. Our goal is production-ready code the moment mainstream compilers catch up. The results speak for themselves: we are parsing JSON directly into C++ structures at gigabytes per second, outpacing even mature heavyweights like Rust's serde. Better yet, the conversion between C++ data structures and JSON is fully automated, thanks to metaprogramming. It has to be the potential to be a leap forward for C++ in the data-driven age. Unfortunately, there are still problems and limitations: we present them and provide some solutions.
19+
1220

1321
## Outline
1422

1523
*You'll not be held to this—we understand that this is a snapshot in time.*
1624

25+
- JSON, performance and safety issues
26+
- C++20 elements: concepts, tag_invoke, constexpr
27+
- C++26 reflective metaprogramming: modest introduction
28+
- How we made use of it: serialization and deserialization
29+
- Optimizing the code: what made a difference!
30+
- Serialization benchmarks!
31+
- Deserialization benchmarks: Rust Serde and others.
32+
- Safety: Is it improved?
33+
- Downside: How challenging is reflective metaprogramming?
34+
- Downside: slower builds? (with numbers!)
35+
- Downside: difficult error messages (with examples!)
36+
1737

1838
## Preferred session length
1939

2040

21-
- [ ] one session (60 minutes)
41+
- [X] one session (60 minutes)
2242
- [ ] half session (30 minutes)
2343
- [ ] two sessions (120 minutes)
2444
- [ ] three sessions (180 minutes)
@@ -39,7 +59,7 @@ Try to answer the reader's questions, What will I learn? and Why is this importa
3959

4060
*If this session will have one or more additional presenters please add their email address(es) here, separated by commas if more than one*
4161

42-
**I use the email address daniel@lemire.me, franciscogthiesen@gmail.com**
62+
daniel@lemire.me, franciscogthiesen@gmail.com
4363

4464
## Target track
4565

@@ -79,7 +99,7 @@ For additional information, see our tagging guide.
7999
## Session Material
80100
*List material that you will submit to the public conference repository: (slides, source code, etc.)*
81101

82-
All of the source code is available publicly as open source. The slides as well as our notes will be made available online.
102+
All of the source code is available publicly as open source (using a business friendly licence). The slides as well as our notes will be made freely available.
83103

84104

85105
## Comments

0 commit comments

Comments
 (0)