Hi
I have a grid doctype with certain nested content fields.
Upon rendering in the front end I can see that the JSON string is not full.
I have added a parameter for macro like this
The code to pass value to the model is var modelValue = control.value.value;@Umbraco.RenderMacro("MyMacro", new { model = modelValue})
and fetching the parameter in view like this var pageModel = Model.MacroParameters["model"]
while i displayed the value in pageModel i can see the values in JSON format.
But if there are more datas in the node then i can see that the JSON string is broken partially like this..(see the last portion, around 10001 characters here in this section)
I tried to increase the JSON Serialization max length in web.config <jsonSerialization maxJsonLength="999999999" /> but neither works.
Any help is appreciated.
-Thanks
JSON string break in Grid Macro Parameter.
Hi
I have a grid doctype with certain nested content fields. Upon rendering in the front end I can see that the JSON string is not full. I have added a parameter for macro like this
The code to pass value to the model is
var modelValue = control.value.value;
@Umbraco.RenderMacro("MyMacro", new { model = modelValue})
and fetching the parameter in view like thisvar pageModel = Model.MacroParameters["model"]
while i displayed the value in
pageModel
i can see the values in JSON format. But if there are more datas in the node then i can see that the JSON string is broken partially like this..(see the last portion, around 10001 characters here in this section)I tried to increase the JSON Serialization max length in web.config
<jsonSerialization maxJsonLength="999999999" />
but neither works.
Any help is appreciated.
-Thanks
Hi Arun
That truncation you are seeing is just your browser dev tools truncating the text string.
Are you sure the JSON value is truncated at all? Try removing the
display:none
style and see.is working on a reply...