Make JsonElement tooltip wrap

Hey all,

I’m using the nodes from System.Text.Json a lot these days to avoid having this XML layer in between when parsing JSON documents. Soon as you have a JsonElement (which you encounter a lot when using these nodes), the tooltip does not wrap, often going beyond screen limits :

Would it be possible to have this one wrap so that the tooltip does not unreasonably expands as it currently does?

You can copy the following XML in a patch window and hover the output of the RootElement output of the RootElement node :

Snippet
<?xml version="1.0" encoding="utf-16"?>
<Patch xmlns:p="property" xmlns:r="reflection" Id="POmTUQ2uB00LLctaAHybh7" MergeId="26408">
  <Canvas Id="Ti8aXLlRJ93NG3vyAWRFBi" MergeId="26407" CanvasType="Group">
    <Node Bounds="598,419,41,19" Id="KtsYcYpQKhKMmYxl1uucXR">
      <p:NodeReference LastCategoryFullName="System.Text.Json.JsonDocument" LastDependency="System.Text.Json.dll" OverloadStrategy="UserSelectedPins">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <CategoryReference Kind="AssemblyCategory" Name="JsonDocument" />
        <Choice Kind="OperationCallFlag" Name="Parse" />
        <PinReference Kind="InputPin" Name="Json">
          <p:DataTypeReference p:Type="TypeReference" LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
            <Choice Kind="TypeFlag" Name="String" />
            <FullNameCategoryReference ID="System" />
            <AssemblyReference ID="System.Runtime.dll" />
          </p:DataTypeReference>
        </PinReference>
      </p:NodeReference>
      <Pin Id="OABPlWg1CxLPAHRAE3DYuU" Name="Json" Kind="InputPin" />
      <Pin Id="Dh1R0jHIDgpNnrkfHBRmKR" Name="Options" Kind="InputPin" />
      <Pin Id="BN2DUmTlMaLMcbfIcUzpjg" Name="Result" Kind="OutputPin" />
    </Node>
    <Pad Id="GMnJftxa0fOQSdcOfye2JU" Bounds="600,221,147,95" ShowValueBox="true" isIOBox="true" Value="[&#xD;&#xA;  {&#xD;&#xA;    &quot;productId&quot;: 1001,&#xD;&#xA;    &quot;productName&quot;: &quot;Wireless Headphones&quot;,&#xD;&#xA;    &quot;description&quot;: &quot;Noise-cancelling wireless headphones with Bluetooth 5.0 and 20-hour battery life.&quot;,&#xD;&#xA;    &quot;brand&quot;: &quot;SoundPro&quot;,&#xD;&#xA;    &quot;category&quot;: &quot;Electronics&quot;,&#xD;&#xA;    &quot;price&quot;: 199.99,&#xD;&#xA;    &quot;currency&quot;: &quot;USD&quot;,&#xD;&#xA;    &quot;stock&quot;: {&#xD;&#xA;      &quot;available&quot;: true,&#xD;&#xA;      &quot;quantity&quot;: 50&#xD;&#xA;    },&#xD;&#xA;    &quot;images&quot;: [&#xD;&#xA;      &quot;https://example.com/products/1001/main.jpg&quot;,&#xD;&#xA;      &quot;https://example.com/products/1001/side.jpg&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;variants&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1001_01&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Black&quot;,&#xD;&#xA;        &quot;price&quot;: 199.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 20&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1001_02&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;White&quot;,&#xD;&#xA;        &quot;price&quot;: 199.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 30&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;dimensions&quot;: {&#xD;&#xA;      &quot;weight&quot;: &quot;0.5kg&quot;,&#xD;&#xA;      &quot;width&quot;: &quot;18cm&quot;,&#xD;&#xA;      &quot;height&quot;: &quot;20cm&quot;,&#xD;&#xA;      &quot;depth&quot;: &quot;8cm&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;ratings&quot;: {&#xD;&#xA;      &quot;averageRating&quot;: 4.7,&#xD;&#xA;      &quot;numberOfReviews&quot;: 120&#xD;&#xA;    },&#xD;&#xA;    &quot;reviews&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 501,&#xD;&#xA;        &quot;userId&quot;: 101,&#xD;&#xA;        &quot;username&quot;: &quot;techguy123&quot;,&#xD;&#xA;        &quot;rating&quot;: 5,&#xD;&#xA;        &quot;comment&quot;: &quot;Amazing sound quality and battery life!&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 502,&#xD;&#xA;        &quot;userId&quot;: 102,&#xD;&#xA;        &quot;username&quot;: &quot;jane_doe&quot;,&#xD;&#xA;        &quot;rating&quot;: 4,&#xD;&#xA;        &quot;comment&quot;: &quot;Great headphones but a bit pricey.&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    &quot;productId&quot;: 1002,&#xD;&#xA;    &quot;productName&quot;: &quot;Smartphone Case&quot;,&#xD;&#xA;    &quot;description&quot;: &quot;Durable and shockproof case for smartphones, available in multiple colors.&quot;,&#xD;&#xA;    &quot;brand&quot;: &quot;CaseMate&quot;,&#xD;&#xA;    &quot;category&quot;: &quot;Accessories&quot;,&#xD;&#xA;    &quot;price&quot;: 29.99,&#xD;&#xA;    &quot;currency&quot;: &quot;USD&quot;,&#xD;&#xA;    &quot;stock&quot;: {&#xD;&#xA;      &quot;available&quot;: true,&#xD;&#xA;      &quot;quantity&quot;: 200&#xD;&#xA;    },&#xD;&#xA;    &quot;images&quot;: [&#xD;&#xA;      &quot;https://example.com/products/1002/main.jpg&quot;,&#xD;&#xA;      &quot;https://example.com/products/1002/back.jpg&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;variants&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1002_01&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Black&quot;,&#xD;&#xA;        &quot;price&quot;: 29.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 100&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1002_02&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Blue&quot;,&#xD;&#xA;        &quot;price&quot;: 29.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 100&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;dimensions&quot;: {&#xD;&#xA;      &quot;weight&quot;: &quot;0.2kg&quot;,&#xD;&#xA;      &quot;width&quot;: &quot;8cm&quot;,&#xD;&#xA;      &quot;height&quot;: &quot;15cm&quot;,&#xD;&#xA;      &quot;depth&quot;: &quot;1cm&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;ratings&quot;: {&#xD;&#xA;      &quot;averageRating&quot;: 4.4,&#xD;&#xA;      &quot;numberOfReviews&quot;: 80&#xD;&#xA;    },&#xD;&#xA;    &quot;reviews&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 601,&#xD;&#xA;        &quot;userId&quot;: 103,&#xD;&#xA;        &quot;username&quot;: &quot;caseuser456&quot;,&#xD;&#xA;        &quot;rating&quot;: 4,&#xD;&#xA;        &quot;comment&quot;: &quot;Very sturdy and fits perfectly.&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 602,&#xD;&#xA;        &quot;userId&quot;: 104,&#xD;&#xA;        &quot;username&quot;: &quot;mobile_fan&quot;,&#xD;&#xA;        &quot;rating&quot;: 5,&#xD;&#xA;        &quot;comment&quot;: &quot;Best case I've bought for my phone!&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    &quot;productId&quot;: 1003,&#xD;&#xA;    &quot;productName&quot;: &quot;4K Ultra HD Smart TV&quot;,&#xD;&#xA;    &quot;description&quot;: &quot;55-inch 4K Ultra HD Smart TV with built-in Wi-Fi and streaming apps.&quot;,&#xD;&#xA;    &quot;brand&quot;: &quot;Visionary&quot;,&#xD;&#xA;    &quot;category&quot;: &quot;Electronics&quot;,&#xD;&#xA;    &quot;price&quot;: 799.99,&#xD;&#xA;    &quot;currency&quot;: &quot;USD&quot;,&#xD;&#xA;    &quot;stock&quot;: {&#xD;&#xA;      &quot;available&quot;: true,&#xD;&#xA;      &quot;quantity&quot;: 30&#xD;&#xA;    },&#xD;&#xA;    &quot;images&quot;: [&#xD;&#xA;      &quot;https://example.com/products/1003/main.jpg&quot;,&#xD;&#xA;      &quot;https://example.com/products/1003/side.jpg&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;variants&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1003_01&quot;,&#xD;&#xA;        &quot;screenSize&quot;: &quot;55 inch&quot;,&#xD;&#xA;        &quot;price&quot;: 799.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 30&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;dimensions&quot;: {&#xD;&#xA;      &quot;weight&quot;: &quot;15kg&quot;,&#xD;&#xA;      &quot;width&quot;: &quot;123cm&quot;,&#xD;&#xA;      &quot;height&quot;: &quot;80cm&quot;,&#xD;&#xA;      &quot;depth&quot;: &quot;10cm&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;ratings&quot;: {&#xD;&#xA;      &quot;averageRating&quot;: 4.8,&#xD;&#xA;      &quot;numberOfReviews&quot;: 250&#xD;&#xA;    },&#xD;&#xA;    &quot;reviews&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 701,&#xD;&#xA;        &quot;userId&quot;: 105,&#xD;&#xA;        &quot;username&quot;: &quot;techlover123&quot;,&#xD;&#xA;        &quot;rating&quot;: 5,&#xD;&#xA;        &quot;comment&quot;: &quot;Incredible picture quality, streaming works seamlessly.&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 702,&#xD;&#xA;        &quot;userId&quot;: 106,&#xD;&#xA;        &quot;username&quot;: &quot;homecinema&quot;,&#xD;&#xA;        &quot;rating&quot;: 4,&#xD;&#xA;        &quot;comment&quot;: &quot;Great TV, but a little bulky.&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    &quot;productId&quot;: 1004,&#xD;&#xA;    &quot;productName&quot;: &quot;Bluetooth Speaker&quot;,&#xD;&#xA;    &quot;description&quot;: &quot;Portable Bluetooth speaker with 12-hour battery life and water resistance.&quot;,&#xD;&#xA;    &quot;brand&quot;: &quot;AudioX&quot;,&#xD;&#xA;    &quot;category&quot;: &quot;Electronics&quot;,&#xD;&#xA;    &quot;price&quot;: 59.99,&#xD;&#xA;    &quot;currency&quot;: &quot;USD&quot;,&#xD;&#xA;    &quot;stock&quot;: {&#xD;&#xA;      &quot;available&quot;: true,&#xD;&#xA;      &quot;quantity&quot;: 100&#xD;&#xA;    },&#xD;&#xA;    &quot;images&quot;: [&#xD;&#xA;      &quot;https://example.com/products/1004/main.jpg&quot;,&#xD;&#xA;      &quot;https://example.com/products/1004/side.jpg&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;variants&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1004_01&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Red&quot;,&#xD;&#xA;        &quot;price&quot;: 59.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 50&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1004_02&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Blue&quot;,&#xD;&#xA;        &quot;price&quot;: 59.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 50&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;dimensions&quot;: {&#xD;&#xA;      &quot;weight&quot;: &quot;0.3kg&quot;,&#xD;&#xA;      &quot;width&quot;: &quot;15cm&quot;,&#xD;&#xA;      &quot;height&quot;: &quot;8cm&quot;,&#xD;&#xA;      &quot;depth&quot;: &quot;5cm&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;ratings&quot;: {&#xD;&#xA;      &quot;averageRating&quot;: 4.6,&#xD;&#xA;      &quot;numberOfReviews&quot;: 150&#xD;&#xA;    },&#xD;&#xA;    &quot;reviews&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 801,&#xD;&#xA;        &quot;userId&quot;: 107,&#xD;&#xA;        &quot;username&quot;: &quot;musicfan23&quot;,&#xD;&#xA;        &quot;rating&quot;: 5,&#xD;&#xA;        &quot;comment&quot;: &quot;Excellent sound quality for its size!&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 802,&#xD;&#xA;        &quot;userId&quot;: 108,&#xD;&#xA;        &quot;username&quot;: &quot;outdoor_lover&quot;,&#xD;&#xA;        &quot;rating&quot;: 4,&#xD;&#xA;        &quot;comment&quot;: &quot;Great for outdoor use, but the battery could last longer.&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  },&#xD;&#xA;  {&#xD;&#xA;    &quot;productId&quot;: 1005,&#xD;&#xA;    &quot;productName&quot;: &quot;Winter Jacket&quot;,&#xD;&#xA;    &quot;description&quot;: &quot;Men's water-resistant winter jacket with a fur-lined hood.&quot;,&#xD;&#xA;    &quot;brand&quot;: &quot;ColdTech&quot;,&#xD;&#xA;    &quot;category&quot;: &quot;Clothing&quot;,&#xD;&#xA;    &quot;price&quot;: 129.99,&#xD;&#xA;    &quot;currency&quot;: &quot;USD&quot;,&#xD;&#xA;    &quot;stock&quot;: {&#xD;&#xA;      &quot;available&quot;: true,&#xD;&#xA;      &quot;quantity&quot;: 80&#xD;&#xA;    },&#xD;&#xA;    &quot;images&quot;: [&#xD;&#xA;      &quot;https://example.com/products/1005/main.jpg&quot;,&#xD;&#xA;      &quot;https://example.com/products/1005/back.jpg&quot;&#xD;&#xA;    ],&#xD;&#xA;    &quot;variants&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1005_01&quot;,&#xD;&#xA;        &quot;size&quot;: &quot;M&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Black&quot;,&#xD;&#xA;        &quot;price&quot;: 129.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 30&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;variantId&quot;: &quot;1005_02&quot;,&#xD;&#xA;        &quot;size&quot;: &quot;L&quot;,&#xD;&#xA;        &quot;color&quot;: &quot;Gray&quot;,&#xD;&#xA;        &quot;price&quot;: 129.99,&#xD;&#xA;        &quot;stockQuantity&quot;: 50&#xD;&#xA;      }&#xD;&#xA;    ],&#xD;&#xA;    &quot;dimensions&quot;: {&#xD;&#xA;      &quot;weight&quot;: &quot;1.5kg&quot;,&#xD;&#xA;      &quot;width&quot;: &quot;60cm&quot;,&#xD;&#xA;      &quot;height&quot;: &quot;85cm&quot;,&#xD;&#xA;      &quot;depth&quot;: &quot;5cm&quot;&#xD;&#xA;    },&#xD;&#xA;    &quot;ratings&quot;: {&#xD;&#xA;      &quot;averageRating&quot;: 4.5,&#xD;&#xA;      &quot;numberOfReviews&quot;: 60&#xD;&#xA;    },&#xD;&#xA;    &quot;reviews&quot;: [&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 901,&#xD;&#xA;        &quot;userId&quot;: 109,&#xD;&#xA;        &quot;username&quot;: &quot;outdoor_adventurer&quot;,&#xD;&#xA;        &quot;rating&quot;: 5,&#xD;&#xA;        &quot;comment&quot;: &quot;Perfect for cold weather, very comfortable!&quot;&#xD;&#xA;      },&#xD;&#xA;      {&#xD;&#xA;        &quot;reviewId&quot;: 902,&#xD;&#xA;        &quot;userId&quot;: 110,&#xD;&#xA;        &quot;username&quot;: &quot;winter_gear&quot;,&#xD;&#xA;        &quot;rating&quot;: 4,&#xD;&#xA;        &quot;comment&quot;: &quot;Nice jacket, but could be a little warmer.&quot;&#xD;&#xA;      }&#xD;&#xA;    ]&#xD;&#xA;  }&#xD;&#xA;]">
      <p:TypeAnnotation LastCategoryFullName="Primitive" LastDependency="VL.CoreLib.vl">
        <Choice Kind="ImmutableTypeFlag" Name="String" />
      </p:TypeAnnotation>
    </Pad>
    <Node Bounds="598,460,74,26" Id="NSA9c3Myy4gNRSefrRDynU">
      <p:NodeReference LastCategoryFullName="System.Text.Json.JsonDocument" LastDependency="System.Text.Json.dll">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <CategoryReference Kind="AssemblyCategory" Name="JsonDocument" />
        <Choice Kind="OperationCallFlag" Name="RootElement" />
      </p:NodeReference>
      <Pin Id="VJW51qPPjXxMvapaLF4om1" Name="Input" Kind="StateInputPin" />
      <Pin Id="LKQTIToDATqMawj2qP7J8q" Name="Output" Kind="StateOutputPin" />
      <Pin Id="EdhdaEYhhcGN56I6qL93V8" Name="Root Element" Kind="OutputPin" />
    </Node>
    <Node Bounds="598,370,51,26" Id="MUN9nbkBW1CPJ83hPrDUnK">
      <p:NodeReference LastCategoryFullName="Primitive.String" LastDependency="VL.CoreLib.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <CategoryReference Kind="StringType" Name="String" NeedsToBeDirectParent="true" />
        <Choice Kind="OperationCallFlag" Name="Replace" />
      </p:NodeReference>
      <Pin Id="Ah8lrBTiY4VPxEQ9L2C1OY" Name="Input" Kind="StateInputPin" />
      <Pin Id="NtVP1MZohNIOGp6HGi6hta" Name="Old Value" Kind="InputPin" />
      <Pin Id="HIk5pkcwe3BPo0WRRugQjm" Name="New Value" Kind="InputPin" />
      <Pin Id="PQBWRD9wKpDNDrtZbsGdbi" Name="Output" Kind="StateOutputPin" />
    </Node>
    <Node Bounds="621,339,54,19" Id="LoL3xEsg4BpNexb8B95QaR">
      <p:NodeReference LastCategoryFullName="Primitive.String" LastDependency="VL.CoreLib.vl">
        <Choice Kind="NodeFlag" Name="Node" Fixed="true" />
        <CategoryReference Kind="StringType" Name="String" NeedsToBeDirectParent="true" />
        <Choice Kind="OperationCallFlag" Name="NewLine" />
      </p:NodeReference>
      <Pin Id="Q7UAukleS0NNFQ3ALc19wF" Name="New Line" Kind="OutputPin" />
    </Node>
  </Canvas>
  <Link Id="Tc7VUdXjgCaQOLGjgHegf7" Ids="BN2DUmTlMaLMcbfIcUzpjg,VJW51qPPjXxMvapaLF4om1" />
  <Link Id="GbP5FVUbbR2NOLxRy3xuGL" Ids="GMnJftxa0fOQSdcOfye2JU,Ah8lrBTiY4VPxEQ9L2C1OY" />
  <Link Id="Kl0BZoN84XoOow8sByFAwS" Ids="Q7UAukleS0NNFQ3ALc19wF,NtVP1MZohNIOGp6HGi6hta" />
  <Link Id="MkV97vQ39wFPiR5Dt97xoz" Ids="PQBWRD9wKpDNDrtZbsGdbi,OABPlWg1CxLPAHRAE3DYuU" />
  <NugetDependency Id="S2bdQkstXKpMx2eIix2VN7" Location="VL.CoreLib" Version="2025.7.1-0106-gc0edd1f65b" />
  <PlatformDependency Id="MsobCaB8YtXMATkxFnTsjH" Location="System.Text.Json" />
</Patch>

Thanks!

4 Likes