| 158 | } |
| 159 | |
| 160 | string SerializeRoutePoints(vector<RouteMarkData> const & points) |
| 161 | { |
| 162 | ASSERT_GREATER_OR_EQUAL(points.size(), 2, ()); |
| 163 | auto pointsNode = base::NewJSONArray(); |
| 164 | for (auto const & p : points) |
| 165 | { |
| 166 | auto pointNode = base::NewJSONObject(); |
| 167 | SerializeRoutePoint(pointNode.get(), p); |
| 168 | json_array_append_new(pointsNode.get(), pointNode.release()); |
| 169 | } |
| 170 | unique_ptr<char, JSONFreeDeleter> buffer(json_dumps(pointsNode.get(), JSON_COMPACT)); |
| 171 | return string(buffer.get()); |
| 172 | } |
| 173 | |
| 174 | vector<RouteMarkData> DeserializeRoutePoints(string const & data) |
| 175 | { |
no test coverage detected