@@ -363,8 +363,10 @@ public HttpResponseMessage LookupData(LookupDataRequestDTO req)
363
363
}
364
364
if ( json is JArray )
365
365
{
366
- AddLookupItems ( req . valueField , req . textField , req . childrenField , res , json as JArray ) ;
366
+ json = json . DeepClone ( ) ;
367
367
JsonUtils . SimplifyJson ( json , DnnLanguageUtils . GetCurrentCultureCode ( ) ) ;
368
+ AddLookupItems ( req . valueField , req . textField , req . childrenField , res , json as JArray ) ;
369
+
368
370
}
369
371
}
370
372
return Request . CreateResponse ( HttpStatusCode . OK , res ) ;
@@ -403,6 +405,8 @@ public HttpResponseMessage Lookup(LookupRequestDTO req)
403
405
{
404
406
json = json [ req . dataMember ] ;
405
407
}
408
+ json = json . DeepClone ( ) ;
409
+ JsonUtils . SimplifyJson ( json , DnnLanguageUtils . GetCurrentCultureCode ( ) ) ;
406
410
407
411
var array = json as JArray ;
408
412
if ( array != null )
@@ -437,6 +441,9 @@ public HttpResponseMessage Lookup(LookupRequestDTO req)
437
441
if ( ! string . IsNullOrEmpty ( req . dataMember ) )
438
442
{
439
443
json = json [ req . dataMember ] ;
444
+ json = json . DeepClone ( ) ;
445
+ JsonUtils . SimplifyJson ( json , DnnLanguageUtils . GetCurrentCultureCode ( ) ) ;
446
+
440
447
if ( json is JArray )
441
448
{
442
449
foreach ( JToken item in ( JArray ) json )
@@ -482,6 +489,8 @@ public HttpResponseMessage LookupCollection(LookupCollectionRequestDTO req)
482
489
foreach ( var item in items )
483
490
{
484
491
var json = item . Data as JObject ;
492
+ json = json . DeepClone ( ) as JObject ;
493
+ JsonUtils . SimplifyJson ( json , DnnLanguageUtils . GetCurrentCultureCode ( ) ) ;
485
494
if ( json ? [ req . textField ] != null )
486
495
{
487
496
res . Add ( new LookupResultDTO ( )
0 commit comments