code: @Override
      public void encodeTo(Encoder enc) {
          if (!isMutated()) {
              if (flDict == null) {
                  enc.beginDict(0);
                  enc.endDict();
              }
              else { enc.writeValue(flDict); }
          }
          else {
              enc.beginDict(valCount);
              for (Map.Entry<String, MValue> entry : valueMap.entrySet()) {
                  final MValue value = entry.getValue();
                  if (!value.isEmpty()) {
                      enc.writeKey(entry.getKey());
                      value.encodeTo(enc);
                  }
              }
  
              if (flDict != null) {
                  final FLDictIterator itr = new FLDictIterator();
                  try {
                      itr.begin(flDict);
                      String key;
                      while ((key = itr.getKeyString()) != null) {
                          if (!valueMap.containsKey(key)) {
                              enc.writeKey(key);
                              enc.writeValue(itr.getValue());
                          }
                          if (!itr.next()) { break; }
                      }
                  }
                  finally {
                      itr.free();
                  }
              }
              enc.endDict();
          }
      }
docs: /* Encodable