| 29 | } |
| 30 | |
| 31 | void VersionedJson::writeFile(VersionedJson const& versionedJson, String const& filename) { |
| 32 | DataStreamBuffer ds; |
| 33 | ds.writeData(Magic, MagicStringSize); |
| 34 | ds.write(versionedJson); |
| 35 | File::overwriteFileWithRename(ds.takeData(), filename); |
| 36 | } |
| 37 | |
| 38 | Json VersionedJson::toJson() const { |
| 39 | return JsonObject{ |