https://github.com/open-source-parsers/jsoncpp/issues/47
diff --git a/include/json/value.h b/include/json/value.h
index 197a856..3473c7e 100644
--- a/include/json/value.h
+++ b/include/json/value.h
@@ -240,8 +240,6 @@
Value& operator=(Value other);
/// Swap values.
- /// \note Currently, comments are intentionally not swapped, for
- /// both logic and efficiency.
void swap(Value& other);
ValueType type() const;
@@ -444,6 +442,9 @@
Value& resolveReference(const char* key, bool isStatic);
+ /// Swap values but leave comments and source offsets in place.
+ void swapPayload(Value& other);
+
#ifdef JSON_VALUE_USE_INTERNAL_MAP
inline bool isItemAvailable() const { return itemIsUsed_ == 0; }