anchor.diff:        Skip := True;
         PostError('Unsupported value type: ' + GetTypeName( System.TypeInfo(T)));
       end;
  +  end;
  +end;
  +
  +function TSvAbstractSerializer<T>.TryDeserializeContainer(AArray: T; var AValue: TValue;
  +  AType: TRttiType; var ACreated: Boolean; AProp: TRttiProperty; const AObj: TValue; var ASkip: Boolean): Boolean;
  +var
  +  LEnumMethod, LClearMethod: TRttiMethod;
  +  LParamsArray: TArray<TRttiParameter>;
  +  arrVal: array of TValue;
  +  LJsonValue: T;
  +  LEnumArray: TArray<TEnumEntry<T>>;
  +  i, x: Integer;
  +  LEnumerator: TValue;
  +begin
  +  Result := False;
  +  LEnumMethod := TSvRttiInfo.GetBasicMethod('Add', AType);
  +  if Assigned(LEnumMethod) and ( (Assigned(AProp)) or not (AValue.IsEmpty)  ) then
  +  begin
  +
  +    if AValue.IsEmpty and Assigned(AProp) then
  +      AValue := TSvRttiInfo.GetValue(AProp, AObj);
  +   // AValue := AProp.GetValue(AObj);
  +
  +    if (AValue.IsObject) and (AValue.AsObject = nil) then
  +    begin
  +      AValue := TSvRttiInfo.CreateType(AProp.PropertyType.Handle);
  +      ACreated := True;
  +    end;
  +
  +    LClearMethod := TSvRttiInfo.GetBasicMethod('Clear', AType);
  +    if Assigned(LClearMethod) and (Length(LClearMethod.GetParameters) = 0) then
  +    begin
  +      LClearMethod.Invoke(AValue, []);
  +    end;
  +
  +    LParamsArray := LEnumMethod.GetParameters;
  +
  +    if Length(LParamsArray) > 1 then
  +    begin
  +      SetLength(arrVal, Length(LParamsArray));
  +      //probably we are dealing with key value pair class like TDictionary
  +      for i := 0 to GetArraySize(AArray) - 1 do
  +      begin
  +        LJsonValue := GetArrayElement(AArray, i);
  +
  +      //  Assert(Length(LParamsArray) = GetObjectSize(LJsonValue), 'Parameters count differ');
  +        if IsObject(LJsonValue) then
  +        begin
  +          LEnumArray := EnumerateObject(LJsonValue);
  +          for x := 0 to Length(LEnumArray) - 1 do
  +          begin
  +            arrVal[x] := SetValue(LEnumArray[x].Value,
  +              AObj, nil, LParamsArray[x].ParamType, ASkip);
  +          end;
  +        end
  +        else if IsArray(LJsonValue) then
  +        begin
  +          for x := 0 to GetArraySize(LJsonValue) - 1 do
  +          begin
  +            arrVal[x] :=
  +              SetValue(GetArrayElement(LJsonValue, x), AObj, nil, LParamsArray[x].ParamType, ASkip);
  +          end;
  +        end;
  +
  +        LEnumerator := LEnumMethod.Invoke(AValue, arrVal);
  +      end;
  +    end
  +    else
  +    begin
  +      SetLength(arrVal, GetArraySize(AArray));
  +
  +      for i := 0 to Length(arrVal)-1 do
  +      begin
  +        LJsonValue := GetArrayElement(AArray, i);
  +        {TODO -oLinas -cGeneral : fix arguments}
  +        //AParams[0].ParamType.AsInstance.
  +        arrVal[i] := SetValue(LJsonValue, AObj, nil, LParamsArray[0].ParamType, ASkip);
  +        LEnumerator := LEnumMethod.Invoke(AValue, [arrVal[i]]);
  +      end;
  +    end;
  +
  +    Result := True;
  +
  +    {if ACreated then
  +    begin
  +      Result := AValue;
  +      ASkip := False;
  +      Exit;
  +    end;
  +    ASkip := True;  }
     end;
   end;
   
  
positive.code: function TSvAbstractSerializer<T>.DoSetFromArray(AJsonArray: T; AType: TRttiType;
    const AObj: TValue; AProp: TRttiProperty; var ASkip: Boolean): TValue;
  var
    LJsonValue: T;
    arrVal: array of TValue;
    i, x: Integer;
    LDst: TDataSet;
    LField: TField;
    sVal: string;
    LObject: TObject;
    LValue, LEnumerator: TValue;
    bCreated: Boolean;
    LEnumMethod, LClearMethod: TRttiMethod;
    LParamsArray: TArray<TRttiParameter>;
    LJsonArray: T;
    LEnumArray: TArray<TEnumEntry<T>>;
  begin
    bCreated := False;
    LValue := TValue.Empty;
    if Assigned(AType) then
    begin
      LJsonArray := AJsonArray;
      case AType.TypeKind of
        tkArray:
        begin
          SetLength(arrVal, GetArraySize(LJsonArray));
  
          for i := 0 to Length(arrVal)-1 do
          begin
            arrVal[i] := SetValue(GetArrayElement(LJsonArray, i), AObj, AProp, TRttiArrayType(AType).ElementType, ASkip);
          end;
  
          Result := TValue.FromArray(AType.Handle, arrVal);
        end;
        tkDynArray:
        begin
          SetLength(arrVal, GetArraySize(LJsonArray));
  
          for i := 0 to Length(arrVal)-1 do
          begin
            arrVal[i] := SetValue(GetArrayElement(LJsonArray, i), AObj, AProp, TRttiDynamicArrayType(AType).ElementType, ASkip);
          end;
  
          Result := TValue.FromArray(AType.Handle, arrVal);
        end;
        tkClass, tkInterface:
        begin
          if Assigned(AType) then
          begin
            if Assigned(AProp) then
            begin
              Result := TSvRttiInfo.GetValue(AProp, AObj);
              if (Result.IsObject) and (Result.AsObject is TDataSet) then
              begin
                //deserialize TDataSet
                LDst := TDataSet(Result.AsObject);  
                if IsAssigned(LJsonArray) then
                begin
                  LDst.DisableControls;
                  FormatSettings := FFormatSettings;
                  try
                    for i := 0 to GetArraySize(LJsonArray) - 1 do
                    begin
                      try
                        LDst.Append;  
                        LJsonValue := GetArrayElement(LJsonArray, i); 
                        LEnumArray := EnumerateObject(LJsonValue);                      
                        for x := 0 to Length(LEnumArray) - 1 do
                        begin
                          //get fieldname from json object
                          sVal := LEnumArray[x].Key;
                          LField := LDst.FindField(sVal);
                          if Assigned(LField) then
                          begin
                            //check if not null
                            if IsNull(LEnumArray[x].Value) then
                              LField.Clear
                            else
                              LField.AsString := GetAsString(LEnumArray[x].Value);
                          end;
                        end;
  
                        LDst.Post;
                      except
                        on E:Exception do
                        begin
                          PostError(E.Message);
                        end;
                      end;
                    end;
  
                  finally
                    LDst.EnableControls;
                    FormatSettings := FOldFormatSettings;
                  end;
                  Exit;
                end;   
              end;
            end
            else
            begin
              //if AProp not assigned then we must create it
              if AType.IsInstance then
              begin
                LObject := TSvRttiInfo.CreateType(AType.Handle);
                if Assigned(LObject) then
                begin
                  LValue := LObject;
                  bCreated := True;
                end;
              end;
            end;
  
            LEnumMethod := TSvRttiInfo.GetBasicMethod('Add', AType);
            if Assigned(LEnumMethod) and ( (Assigned(AProp)) or not (LValue.IsEmpty)  ) then
            begin
              if LValue.IsEmpty and Assigned(AProp) then
                LValue := TSvRttiInfo.GetValue(AProp, AObj);
             // AValue := AProp.GetValue(AObj);
  
              if (LValue.IsObject) and (LValue.AsObject = nil) then
              begin
                LValue := TSvRttiInfo.CreateType(AProp.PropertyType.Handle);
                bCreated := True;
              end;
  
              LClearMethod := TSvRttiInfo.GetBasicMethod('Clear', AType);
              if Assigned(LClearMethod) and (Length(LClearMethod.GetParameters) = 0) then
              begin
                LClearMethod.Invoke(LValue, []);
              end;
  
              LParamsArray := LEnumMethod.GetParameters;
  
              if Length(LParamsArray) > 1 then
              begin
                SetLength(arrVal, Length(LParamsArray));
                //probably we are dealing with key value pair class like TDictionary    
                for i := 0 to GetArraySize(LJsonArray) - 1 do
                begin
                  LJsonValue := GetArrayElement(LJsonArray, i);                     
  
                //  Assert(Length(LParamsArray) = GetObjectSize(LJsonValue), 'Parameters count differ');                
                  if IsObject(LJsonValue) then
                  begin
                    LEnumArray := EnumerateObject(LJsonValue);
                    for x := 0 to Length(LEnumArray) - 1 do
                    begin
                      arrVal[x] := SetValue(LEnumArray[x].Value,
                        AObj, nil, LParamsArray[x].ParamType, ASkip);
                    end;
                  end
                  else if IsArray(LJsonValue) then
                  begin
                    for x := 0 to GetArraySize(LJsonValue) - 1 do
                    begin
                      arrVal[x] :=
                        SetValue(GetArrayElement(LJsonValue, x), AObj, nil, LParamsArray[x].ParamType, ASkip);
                    end;
                  end;
  
                  LEnumerator := LEnumMethod.Invoke(LValue, arrVal);
                end;
              end
              else
              begin
                SetLength(arrVal, GetArraySize(LJsonArray));
  
                for i := 0 to Length(arrVal)-1 do
                begin
                  LJsonValue := GetArrayElement(LJsonArray, i);   
                  {TODO -oLinas -cGeneral : fix arguments}
                  //AParams[0].ParamType.AsInstance.
                  arrVal[i] := SetValue(LJsonValue, AObj, nil, LParamsArray[0].ParamType, ASkip);
                  LEnumerator := LEnumMethod.Invoke(LValue, [arrVal[i]]);
                end;
              end;
  
              if bCreated then
              begin
                Result := LValue;
                ASkip := False;
                Exit;
              end;
              ASkip := True;
            end;
          end;
        end
        else
        begin
          ASkip := True;
          PostError('Cannot assign array data to non array type');
         // raise ESvSerializeException.Create('Cannot assign array data to non array type');
        end;
      end;
    end;
  
negative.code:           if Assigned(LObject) then
            begin
              Result := LObject;
              SetClassProperties(Result, ASkip, AType, AJsonObject);
            end;
          end;
        end
  