Skip to content
Snippets Groups Projects
Commit 43611926 authored by Oz Linden's avatar Oz Linden
Browse files

add convenience function ll_stream_notation_sd for compact representation of llsd

parent ac10109d
No related branches found
No related tags found
No related merge requests found
......@@ -193,6 +193,17 @@ char* ll_pretty_print_sd(const LLSD& sd)
return buffer;
}
std::string ll_stream_notation_sd(const LLSD& sd)
{
std::ostringstream stream;
//stream.rdbuf()->pubsetbuf(buffer, bufferSize);
stream << LLSDOStreamer<LLSDNotationFormatter>(sd);
stream << std::ends;
return stream.str();
}
//compares the structure of an LLSD to a template LLSD and stores the
//"valid" values in a 3rd LLSD. Default values pulled from the template
//if the tested LLSD does not contain the key/value pair.
......
......@@ -56,6 +56,8 @@ LL_COMMON_API char* ll_print_sd(const LLSD& sd);
LL_COMMON_API char* ll_pretty_print_sd_ptr(const LLSD* sd);
LL_COMMON_API char* ll_pretty_print_sd(const LLSD& sd);
LL_COMMON_API std::string ll_stream_notation_sd(const LLSD& sd);
//compares the structure of an LLSD to a template LLSD and stores the
//"valid" values in a 3rd LLSD. Default values
//are pulled from the template. Extra keys/values in the test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment