Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/17/20 12:33:35 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • refactored JsonTemplateInstantiator -> now returns a InstantiatorResult which contains the optimizer and an IEnumerable of IResultJsonItem
  • code cleanup in JCGenerator
  • relocated the serialization of json items into IJsonItem with method GenerateJObject (virtual base implementation in JsonItem)
    • this allows custom serialization for json items (example: ValueLookupJsonItem)
    • items of interface IIntervalRestrictedJsonItem have a custom implementation of GenerateJObject -> hides Minimum and Maximum if the values are the physically min/max of their type
  • code cleanup in BaseConverter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs

    r17473 r17477  
    1515      IValueLookupJsonItem lookupItem = data as IValueLookupJsonItem;
    1616      param.ActualName = lookupItem.ActualName;
    17       if (param.Value != null)
    18         root.Inject(param.Value, lookupItem.JsonItemReference, root);
     17      if (param.Value != null && lookupItem.ActualValue != null)
     18        root.Inject(param.Value, lookupItem.ActualValue, root);
    1919    }
    2020
     
    2626      if (param.Value != null) {
    2727        IJsonItem tmp = root.Extract(param.Value, root);
    28         item.AddChildren(tmp.Children);
    29         item.JsonItemReference = tmp;
     28        tmp.Parent = item;
     29        //item.AddChildren(tmp.Children);
     30        item.ActualValue = tmp;
    3031      }
    3132      item.Name = param.Name;
Note: See TracChangeset for help on using the changeset viewer.