# Generate single line json struture with cv::FileStorage

**URL:** <https://forum.opencv.org/t/generate-single-line-json-struture-with-cv-filestorage/11985>\
**Category:** C++\
**Created:** [February 13, 2023, 1:35pm UTC](https://forum.opencv.org/t/generate-single-line-json-struture-with-cv-filestorage/11985 "2023-02-13T13:35:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franck](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@franck](https://forum.opencv.org/u/franck)\
**Post date:** [February 13, 2023, 1:35pm UTC](https://forum.opencv.org/t/generate-single-line-json-struture-with-cv-filestorage/11985/1 "2023-02-13T13:35:46Z")

</div>

I try to write a one line json structure of a comple open cv struct.  
I understand how to genere for my own objet one line with the help of “{:” syntaxe.  
But when dumping cv::Rect2f for example multiple is produced

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [February 15, 2023, 9:26am UTC](https://forum.opencv.org/t/generate-single-line-json-struture-with-cv-filestorage/11985/2 "2023-02-15T09:26:37Z")

</div>

> [@franck](#):
>
> I try to write a one line json structure of a comple open cv struct.

rather come up with your very own json (why that, at all ?) serialization.  
(noone will mess with the library code, to fit it to your (very special) needs)
