From b36f4c477c40356a0ae1204b567cca3c2a57d201 Mon Sep 17 00:00:00 2001 From: Griffin Myers Date: Thu, 5 Sep 2024 14:28:24 -0400 Subject: [PATCH] Update natvis to reflect 3.11.3 and the current structure of basic_json (#4451) * Update natvis Jinja template to reflect the current structure of basic_json. In 5a1a57510a330a521d1b20170b8e45aad52d790a the underlying structure of basic_json was altered to move m_type and m_value under an m_data field. This updates the nativ template to be consistent with this change. * Generate nlohmann_json.natvis for 3.11.3 and latest basic_json structure. --- nlohmann_json.natvis | 258 +++++++++--------- tools/generate_natvis/nlohmann_json.natvis.j2 | 26 +- 2 files changed, 142 insertions(+), 142 deletions(-) diff --git a/nlohmann_json.natvis b/nlohmann_json.natvis index a831ea04b..fbe4221f2 100644 --- a/nlohmann_json.natvis +++ b/nlohmann_json.natvis @@ -7,21 +7,21 @@ - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) @@ -37,21 +37,21 @@ - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) @@ -65,30 +65,30 @@ - - - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + + + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) - + {second} second @@ -97,21 +97,21 @@ - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) @@ -125,30 +125,30 @@ - - - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + + + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) - + {second} second @@ -157,21 +157,21 @@ - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) @@ -185,30 +185,30 @@ - - - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + + + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) - + {second} second @@ -217,21 +217,21 @@ - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) @@ -245,30 +245,30 @@ - - - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + + + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple) - + {second} second diff --git a/tools/generate_natvis/nlohmann_json.natvis.j2 b/tools/generate_natvis/nlohmann_json.natvis.j2 index d6b728935..c3eafa54b 100644 --- a/tools/generate_natvis/nlohmann_json.natvis.j2 +++ b/tools/generate_natvis/nlohmann_json.natvis.j2 @@ -8,21 +8,21 @@ {% for ns in namespaces %} - null - {*(m_value.object)} - {*(m_value.array)} - {*(m_value.string)} - {m_value.boolean} - {m_value.number_integer} - {m_value.number_unsigned} - {m_value.number_float} - discarded + null + {*(m_data.m_value.object)} + {*(m_data.m_value.array)} + {*(m_data.m_value.string)} + {m_data.m_value.boolean} + {m_data.m_value.number_integer} + {m_data.m_value.number_unsigned} + {m_data.m_value.number_float} + discarded - - *(m_value.object),view(simple) + + *(m_data.m_value.object),view(simple) - - *(m_value.array),view(simple) + + *(m_data.m_value.array),view(simple)