Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit fafb37c0 authored by EXT Arnaud Clère's avatar EXT Arnaud Clère
Browse files

Update README.md with results of fluent interface

parent 0266b674
......@@ -131,7 +131,8 @@ private:
};
```
One can be much faster and get more control implementing a custom `bind` method using a convenient fluent interface:
One can be much faster and get more control implementing a custom `bind` method using a convenient fluent interface for which
smart editors will provide code completion similar to that of an XML/JSON editor:
```cpp
struct Person
{
......@@ -154,7 +155,38 @@ struct Person
};
```
<details>
<summary>To be compared with the minimum required to produce the same output using QCborStreamWriter...</summary>
<summary>The same bind can read/write data in various formats with the same data (but varying metadata support)</summary>
```xml
<Person>
<names>
<string>John</string>
<string>Doe</string>
</names>
<height>1.75</height>
<age>18</age>
<phones><Phone><Home>2</Home><number>+44 1234567</number></Phone></phones>
<comments>...</comments>
<children/>
</Person>
```
```json
{
"names":[
"John",
"Doe"
],
"height":1.75,
"age":18,
"phones":[{"type":2,"number":"+44 1234567"}],
"comments":"...",
"children":[]
}
```
</details>
<details>
<summary>This code can be compared with the minimum required to produce the same output using QCborStreamWriter...</summary>
```cpp
QCborStreamWriter s(&b);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment