Major rework of 64 integer support: 64 bits integer are only returned when explicitly request via Json::Value::asInt64(), unlike previous implementation where Json::Value::asInt() returned a 64 bits integer.
This eases porting portable code and does not break compatibility with the previous release.
Json::Value::asLargestInt() has also be added to ease writing portable code independent of 64 bits integer support. It is typically used to implement writers.
diff --git a/include/json/writer.h b/include/json/writer.h
index 4d74f93..2ee13de 100644
--- a/include/json/writer.h
+++ b/include/json/writer.h
@@ -162,8 +162,12 @@
bool addChildValues_;
};
+# if defined(JSON_HAS_INT64)
std::string JSON_API valueToString( Int value );
std::string JSON_API valueToString( UInt value );
+# endif // if defined(JSON_HAS_INT64)
+ std::string JSON_API valueToString( LargestInt value );
+ std::string JSON_API valueToString( LargestUInt value );
std::string JSON_API valueToString( double value );
std::string JSON_API valueToString( bool value );
std::string JSON_API valueToQuotedString( const char *value );