| 255 | */ |
| 256 | template <typename TSource> |
| 257 | bool saveToFile(const TSource& source, const String& filename, SerializationFormat format = JSON_FORMAT_DEFAULT) |
| 258 | { |
| 259 | FileStream stream(filename, File::WriteOnly | File::CreateNewAlways); |
| 260 | if(!stream.isValid()) { |
| 261 | return false; |
| 262 | } |
| 263 | |
| 264 | if(serialize(source, stream, format) == 0) { |
| 265 | return false; |
| 266 | } |
| 267 | |
| 268 | return stream.getLastError() == 0; |
| 269 | } |
| 270 | |
| 271 | template <typename TInput> |
| 272 | bool deserializeInternal(JsonDocument& doc, TInput& input, SerializationFormat format = JSON_FORMAT_DEFAULT) |
no test coverage detected