mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
General beast update, fixes, optimizations, features:
* Clean ups, optimizations, and new File::commonDocumentsDirectory enum * Replace sortArray with std::sort for performance * More error tolerance in XML parser, speedups * Refactor some byte-order mark detection code * Add String::appendCharPointer overloads * More XML parser optimisations and better error detection * Misc performance tweaks * Fixes for support of non utf8 strings * Increased precision when storing strings in XmlElement * Minor clean-ups * Minor fix to XmlDocument * Cleanups to CriticalSection and related synchronization primitives * Fix DynamicArray unit test
This commit is contained in:
@@ -311,7 +311,7 @@ private:
|
||||
buffer.appendUTF8Char (c);
|
||||
}
|
||||
|
||||
result = buffer.toString();
|
||||
result = buffer.toUTF8 ();
|
||||
return Result::ok();
|
||||
}
|
||||
};
|
||||
@@ -521,7 +521,7 @@ String JSON::toString (const var& data, const bool allOnOneLine)
|
||||
{
|
||||
MemoryOutputStream mo (1024);
|
||||
JSONFormatter::write (mo, data, 0, allOnOneLine);
|
||||
return mo.toString();
|
||||
return mo.toUTF8 ();
|
||||
}
|
||||
|
||||
void JSON::writeToStream (OutputStream& output, const var& data, const bool allOnOneLine)
|
||||
|
||||
@@ -24,13 +24,10 @@
|
||||
#ifndef BEAST_JSON_H_INCLUDED
|
||||
#define BEAST_JSON_H_INCLUDED
|
||||
|
||||
#include "../misc/beast_Result.h"
|
||||
#include "../containers/beast_Variant.h"
|
||||
class InputStream;
|
||||
class OutputStream;
|
||||
class File;
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Contains static methods for converting JSON-formatted text to and from var objects.
|
||||
|
||||
Reference in New Issue
Block a user