anchor.diff:  
   
   %%%===================================================================
  -%%% Definitions
  -%%%===================================================================
  -
  -%% Encoded record name field
  --define(RECORD_TYPE_MARKER, "<record_type>").
  -
  -%% Encoded record version field
  --define(RECORD_VERSION_MARKER, "<record_version>").
  -
  -
  -%%%===================================================================
   %%% Types
   %%%===================================================================
   
   -type field_name() :: atom().
   -type record_key() :: binary | atom | integer | term | string.
   -type record_value() :: json %% Raw JSON binary
  -    %% or simple types
  -    | record_key() | boolean | [record_struct()] | {record_struct()} | #{record_key() => record_struct()}
  -    %% or custom value - executes Mod:Encoder(GivenTerm) while encoding and Mod:Decoder(SavedJSON) while decoding.
  -    %% Encoder shall return JSON binary, Decoder shall decode JSON binary to original term.
  -    | {custom_value, {Mod :: atom(), Encoder :: atom(), Decoder :: atom()}}
  -    %% or custom value - executes Mod:Encoder(TypeName, GivenTerm) while encoding and Mod:Decoder(TypeName, SavedJSON) while decoding.
  -    %% Encoder shall return JSON binary, Decoder shall decode JSON binary to original term.
  -    %% You can specify only module name, Decoder defaults to 'encode_value', Decoder defaults to 'decode_value'
  -    | {custom_type, TypeName :: atom(), Mod :: atom()} | {custom_type, TypeName :: atom(), {Mod :: atom(), Encoder :: atom(), Decoder :: atom()}}.
  +%% or simple types
  +| record_key() | boolean | [record_struct()] | {record_struct()} | #{record_key() => record_struct()}
  +%% or custom value - executes Mod:Encoder(GivenTerm) while encoding and Mod:Decoder(SavedJSON) while decoding.
  +%% Encoder shall return JSON binary, Decoder shall decode JSON binary to original term.
  +| {custom_value, {Mod :: atom(), Encoder :: atom(), Decoder :: atom()}}
  +%% or custom value - executes Mod:Encoder(TypeName, GivenTerm) while encoding and Mod:Decoder(TypeName, SavedJSON) while decoding.
  +%% Encoder shall return JSON binary, Decoder shall decode JSON binary to original term.
  +%% You can specify only module name, Decoder defaults to 'encode_value', Decoder defaults to 'decode_value'
  +| {custom_type, TypeName :: atom(), Mod :: atom()} | {custom_type, TypeName :: atom(), {Mod :: atom(), Encoder :: atom(), Decoder :: atom()}}.
   -type record_version() :: non_neg_integer().
   -type record_struct() :: record_value()
  -    | {record, record_version(), [{field_name(), record_value()}]} %% Used only internally
  -    | {record, [{field_name(), record_value()}]} %% For defining model structure
  -    | {record, model_behaviour:model_type()}. %% For referencing nasted model
  +| {record, record_version(), [{field_name(), record_value()}]} %% Used only internally
  +| {record, [{field_name(), record_value()}]} %% For defining model structure
  +| {record, model_behaviour:model_type()}. %% For referencing nasted model
   -type ejson() :: term(). %% eJSON
   
   
  
positive.code: -spec decode_record_vcs(ejson()) -> {WasUpdated :: boolean(), record_version(), term()}.
  decode_record_vcs({Term}) when is_list(Term) ->
      {Version, Record} = decode_record({Term}),
      ModelName = element(1, Record),
      #model_config{version = TargetVersion} = ModelName:model_init(),
      {NewVersion, NewRecord} = record_upgrade(ModelName, TargetVersion, Version, Record),
      {Version /= NewVersion, NewVersion, NewRecord}.
  
negative.code:     Mod:Decoder(decode_record(Term, json), TypeName);
  decode_record(Term, {custom_type, TypeName, Mod}) ->
      decode_record(Term, {custom_type, TypeName, {Mod, encode_value, decode_value}});
  decode_record({Term}, {record, Version, Fields}) when is_list(Fields), is_list(Term) ->
      ModelName0 = decode_record(proplists:get_value(<<?RECORD_TYPE_MARKER>>, Term), atom),
      ModelName = maybe_rename_model(ModelName0, Version),
      list_to_tuple(lists:reverse(lists:foldl(
          fun({Name, Type}, RecordList) ->
              [decode_record(proplists:get_value(encode_record(key, Name, atom), Term), Type) | RecordList]
          end,
          [ModelName], Fields)));
  decode_record(Term, string) when is_binary(Term) ->
      Term;
  decode_record(Term, integer) when is_integer(Term) ->
      Term;
  decode_record(Term, integer) when is_float(Term) andalso (Term =:= float(round(Term))) ->
      round(Term);
  decode_record(Term, integer) when is_binary(Term) ->
      binary_to_integer(Term);
  decode_record(Term, float) when is_float(Term) ->
      Term;
  decode_record(Term, float) when is_integer(Term) ->
      float(Term);
  decode_record(Term, float) when is_binary(Term) ->
      binary_to_float(Term);
  decode_record({Term}, #{} = Struct) when is_list(Term) ->
  