Would be useful for gstwebrtc stats logging.
Created attachment 450217 [details] Patch
Comment on attachment 450217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450217&action=review > Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:556 > + auto resultArray = array->asArray(); > + return resultArray->asValue(); I would collapse these two lines if possible. > Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.h:322 > +String structureToJSONString(const GstStructure*); I might go (not only for this method, but for the other ones as well) for something like gstStructureTo... > Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp:57 > + ASSERT_EQ(jsonString, "{\"int-val\":5,\"str-val\":\"foo\",\"bool-val\":1}"); Are we not interested in printing the structure name?
Comment on attachment 450217 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450217&action=review >> Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp:57 >> + ASSERT_EQ(jsonString, "{\"int-val\":5,\"str-val\":\"foo\",\"bool-val\":1}"); > > Are we not interested in printing the structure name? For non-nested structures I don't see the point and it would add one level of nesting, only for the name: {"name": {...}}. > Tools/TestWebKitAPI/Tests/WebCore/gstreamer/GStreamerTest.cpp:62 > + ASSERT_EQ(jsonString, "{\"int-val\":5,\"str-val\":\"foo\",\"bool-val\":1,\"inner\":{\"boo\":0,\"double-val\":2.42}}"); Here the nested struct is identified by its name though.
Created attachment 450358 [details] Patch
Committed r288799 (246575@main): <https://commits.webkit.org/246575@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450358 [details].
<rdar://problem/88239833>