anchor.diff:      CKey = imem_datatype:binterm_to_term(EncodedKey),
       #{ckey => CKey, cvalue => CValue, chash => CHash}.
   
  -skvh_audit_to_map(#skvhAudit{time = Time, ckey = EncodedKey, ovalue = OldValue, nvalue = NewValue, cuser = User}) ->
  +skvh_audit_to_map(#skvhAudit{time = Time, ckey = EncodedKey, ovalue = OldValue,
  +                             nvalue = NewValue, cuser = User}) ->
       CKey = imem_datatype:binterm_to_term(EncodedKey),
  -    #{time => Time, ckey => CKey, ovalue => OldValue, nvalue => NewValue, cuser => User}.
  +    #{time => Time, ckey => CKey, cuser => User,
  +      ovalue => if is_binary(OldValue) ->
  +                      imem_json:decode(OldValue, [return_maps]);
  +                   true -> OldValue
  +                end,
  +      nvalue => if is_binary(NewValue) ->
  +                      imem_json:decode(NewValue, [return_maps]);
  +                   true -> NewValue
  +                end}.
   
   skvh_hist_to_map(#skvhHist{ckey = EncodedKey, cvhist = ChangeList}) ->
       CKey = imem_datatype:binterm_to_term(EncodedKey),
  
positive.code:         , readGE/4          %% (User, Channel, CKey1, Limit)        start with first key at or after CKey1, return Limit results or less as maps
          , readGE/5          %% (User, Channel, Item, CKey1, Limit)  start with first key at or after CKey1, return Limit results or less
          , audit_readGT/4    %% (User, Channel, TS1, Limit)          read audit info after Timestamp1, resturn a list of maps with Limit results or less
          , hist_read/3       %% (User, Channel, KeyList)             return history list as maps for given keys
          , audit_readGT/5    %% (User, Channel, Item, TS1, Limit)    read audit info after Timestamp1, return Limit results or less
          , remove/3          %% (User, Channel, RowList)             delete a resource will fail if it was modified, rows should be in map format
          , delete/3          %% (User, Channel, KeyTable)            do not complain if keys do not exist
          , deleteGELT/5      %% (User, Channel, CKey1, CKey2, L)     delete range of keys >= CKey1 and < CKey2, fails if more than L rows
  
negative.code: 	MatchFunction = {?MATCHHEAD, [{'>', '$1', match_val(Key1)}], ['$_']},
  	read_limited(Cmd, SkvhCtx, Item, MatchFunction, Limit).
  
  audit_readGT(User, Channel, TimeStamp, Limit) when is_binary(Channel) ->
      audit_readGT(User, atom_audit_alias(Channel), TimeStamp, Limit);
  audit_readGT(User, AuditAliasAtom, TimeStamp, Limit)
    when is_binary(TimeStamp) ->
      audit_readGT(User, AuditAliasAtom,
                   imem_datatype:io_to_timestamp(TimeStamp), Limit);
  audit_readGT(User, AuditAliasAtom, TimeStamp, Limit)
    when is_atom(AuditAliasAtom), is_tuple(TimeStamp) ->
      audit_readGT(User, audit_partitions(AuditAliasAtom, TimeStamp), TimeStamp, Limit);
  audit_readGT(_User, AuditPartitions, TimeStamp, Limit)
    when is_list(AuditPartitions), is_tuple(TimeStamp) ->
      audit_part_readGT(
        AuditPartitions,
        {#skvhAudit{time = '$1', _ = '_'},
         [{'>', '$1', match_val(TimeStamp)}],
         ['$_']},
        Limit).
  
  audit_readGT(User, Channel, Item, TS1, Limit)  when is_binary(Item), is_binary(TS1) ->
  	Cmd = [audit_readGT, User, Channel, Item, TS1, Limit],
  	audit_readGT(User, Cmd, channel_ctx(Channel), Item, imem_datatype:io_to_timestamp(TS1), io_to_integer(Limit)).
  