Deserialize the string, resulted from {@link #toPartitionJsonList(List)}, to a list of partition descriptors
350605
public static List<PartitionDescriptor> fromPartitionJsonList(String jsonList) {
    return Descriptor.GSON.fromJson(jsonList, DESCRIPTOR_LIST_TYPE);
  }
285442
public JSONObject topologyToJSON() throws JSONException {
        JSONStringer stringer = new JSONStringer();
        stringer.object();

        stringer.keySymbolValuePair(TOPO_VERSION, version);

        stringer.key(TOPO_PARTITIONS).array();
        for (Partition partition : partitionsById.values()) {
            partition.toJSON(stringer);
        }
        stringer.endArray();

        stringer.key(TOPO_HOSTS).array();
        for (Host host : hostsById.values()) {
            host.toJSON(stringer);
        }
        stringer.endArray();
        stringer.keySymbolValuePair(TOPO_SITES_PER_HOST, getSitesPerHost());
        stringer.keySymbolValuePair(TOPO_REPLICATION_FACTOR, getReplicationFactor());
        stringer.keySymbolValuePair(TOPO_UNBALANCED_PART_COUNT, m_unbalancedPartitionCount);

        stringer.endObject();

        return new JSONObject(stringer.toString());
    }
1360843
function __deserializeString(buffer, start, options) {
	let step = 1;
	let dataView = new DataView(buffer);
	let length = dataView.getUint32(start, true);
	start += 4;
	let end = start + length;
	let dataArray = [];
	for (let i = start; i < end; i += step) {
		dataArray.push(dataView.getUint8(i));
	}
	let data = UTF8Decode(Uint8Array.from(dataArray).buffer);
	return { anchor: end, value: data };
}
775853
@Override
    public ConcurrentMap<String, Object> deserializeAttributes(final byte[] in ) {

        if ( LOG.isDebugEnabled() ) {
            LOG.debug( "Reading serialized data:\n" + new String( in ) );
        }

        return doDeserialize( in, "attributes" );
    }
803769
public String toJSON(List<JTSFeature> list) {
		Object fcJSON = this.startFeatureCollection();
		for (JTSFeature feature : list) {
			Object f = this.startFeature();
			Object p = this.startPoint();
			try {
				this.addXToPoint(feature.getGeometry().getGeometry()
						.getCentroid().getX(), p);
				this.addYToPoint(feature.getGeometry().getGeometry()
						.getCentroid().getY(), p);
			} catch (BaseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

			Iterator it = feature.getAttributes().keySet().iterator();
			while (it.hasNext()) {
				String key = it.next().toString();
				this.addElementToFeature(feature.getAttribute(key).value, key,
						f);
			}

			p = this.endPoint(p, null, null);
			this.addPointToFeature(f, p);
			this.endFeature(f);
			this.addFeatureToCollection(fcJSON, f);
		}

		fcJSON = this.endFeatureCollection(fcJSON);

		return this.featureCollectionAsJSON((org.json.JSONObject) fcJSON);
	}
1230831
private JSONValue toJsonStringList(Collection<? extends Object> list) {

        if (null != list) {
            JSONArray array = new JSONArray();
            for (Object o : list) {
                array.set(array.size(), new JSONString(o.toString()));
            }
            return array;
        } else {
            return null;
        }
    }
793489
private void deserializeCommon(byte[] descriptor) throws IOException {
        this.systemIdentifier = Util.getAChars(descriptor, 9, 32, this.encoding);
        this.volumeIdentifier = Util.getDChars(descriptor, 41, 32, this.encoding);
        this.volumeSetIdentifier = Util.getDChars(descriptor, 191, 128, this.encoding);
        this.rootDirectoryEntry = new Iso9660FileEntry(this.isoFile, descriptor, 157);
    }
863784
public static List<CopyEntity> deserializeList(String serialized) {
    return GSON.fromJson(getSerializedWithNewPackage(serialized), new TypeToken<List<CopyEntity>>() {}.getType());
  }
431350
public static List<ServiceRequester> deserialize(String encodedString) throws IOException {
    String base64Str = URLDecoder.decode(encodedString, "UTF-8");
    byte[] decodedBytes = Base64.getDecoder().decode(base64Str);
    String jsonList = new String(decodedBytes, "UTF-8");
    TypeReference<List<ServiceRequester>> mapType = new TypeReference<List<ServiceRequester>>() {};
    List<ServiceRequester> requesterList = objectMapper.readValue(jsonList, mapType);
    return requesterList;
  }
146791
public String toJSONString() {
    return JSON.toJSONString(this, ObjectValueFilter.instance,
          SerializerFeature.WriteClassName,
          SerializerFeature.DisableCircularReferenceDetect);
  }
1252529
private List<Data> selectThisPartitionsKeys() {
        final IPartitionService partitionService = mapServiceContext.getNodeEngine().getPartitionService();
        final int partitionId = getPartitionId();
        List<Data> dataKeys = null;
        for (Data key : keys) {
            if (partitionId == partitionService.getPartitionId(key)) {
                if (dataKeys == null) {
                    dataKeys = new ArrayList<>(keys.size());
                }
                dataKeys.add(key);
            }
        }
        if (dataKeys == null) {
            return Collections.emptyList();
        }
        return dataKeys;
    }
967913
public static String[] parseFilterDescriptor(String mapDesc) throws CertificateMapperException {
        if (mapDesc == null || mapDesc.isEmpty()) {
            String msg = Tr.formatMessage(tc, WIMMessageKey.INVALID_CERTIFICATE_FILTER, mapDesc);
            throw new CertificateMapperException(WIMMessageKey.INVALID_CERTIFICATE_FILTER, msg);
        }

        int prev_idx, cur_idx, end_idx;
        ArrayList<String> list = new ArrayList<String>();
        for (prev_idx = cur_idx = 0, end_idx = mapDesc.length(); cur_idx < end_idx; prev_idx = cur_idx) {
            boolean isSquareBrace = false;
            if (mapDesc.contains("$[")) {
                isSquareBrace = true;
                cur_idx = mapDesc.indexOf("$[", prev_idx);
            } else {
                cur_idx = mapDesc.indexOf("${", prev_idx);
            }
            if (cur_idx == -1) {
                if (prev_idx < end_idx) {
                    list.add(mapDesc.substring(prev_idx));
                }
                break;
            }
            if (prev_idx < cur_idx) {
                list.add(mapDesc.substring(prev_idx, cur_idx));
            }
            prev_idx = cur_idx;
            if (isSquareBrace) {
                cur_idx = mapDesc.indexOf("]", prev_idx);
            } else {
                cur_idx = mapDesc.indexOf("}", prev_idx);
            }
            if (cur_idx == -1) {
                String msg = Tr.formatMessage(tc, WIMMessageKey.INVALID_CERTIFICATE_FILTER, mapDesc);
                throw new CertificateMapperException(WIMMessageKey.INVALID_CERTIFICATE_FILTER, msg);
            }
            cur_idx++;
            list.add(mapDesc.substring(prev_idx, cur_idx));
        }
        String[] mapDescEles = new String[list.size()];
        for (int idx = 0; idx < list.size(); idx++) {
            mapDescEles[idx] = list.get(idx);
        }
        return mapDescEles;
    }
174469
private String _serializeList(List list, Map<Object, String> done, String id) throws ConverterException {
	// <ARRAY ID="1" SIZE="1"><ITEM INDEX="1" TYPE="STRING">hello world</ITEM></ARRAY>
	StringBuilder sb = new StringBuilder(goIn() + "<ARRAY ID=\"" + id + "\" SIZE=" + del + list.size() + del + ">");
	int index;
	ListIterator it = list.listIterator();
	while (it.hasNext()) {
	    // <ITEM INDEX="1" TYPE="STRING">hello world</ITEM>
	    index = it.nextIndex();
	    String value = _serialize(it.next(), done);
	    sb.append(goIn() + "<ITEM INDEX=\"" + (index + 1) + "\" TYPE=\"" + type + "\">");
	    sb.append(value);
	    sb.append(goIn() + "</ITEM>");
	}

	sb.append(goIn() + "</ARRAY>");
	type = "ARRAY";
	return sb.toString();
    }
527337
public List<Filter> deserializeFilterList(String str) {
        return load(str, ListWrappers.FilterList.class).getList();
    }
114420
function serializeToJRD(descriptor) {
  var obj = {};
  if (descriptor.expires) { obj.expires = xsdDateTimeString(descriptor.expires); }
  if (descriptor.subject) { obj.subject = descriptor.subject; }
  if (descriptor.aliases.length > 0) {
    obj.aliases = [];
    descriptor.aliases.forEach(function(alias) {
      obj.aliases.push(alias);
    });
  }
  
  if (descriptor.properties.length > 0) {
    obj.properties = {};
    descriptor.properties.forEach(function(key, value) {
      obj.properties[key] = value;
    }, { flatten: true });
  }
  
  if (descriptor.links.length > 0) {
    obj.links = [];
    descriptor.links.forEach(function(link) {
      var l = {};
      if (link.rel) { l.rel = link.rel; }
      if (link.href) { l.href = link.href; }
      if (link.template) { l.template = link.template; }
      if (link.type) { l.type = link.type; }
      
      if (link.titles.length > 0) {
        l.titles = {};
        link.titles.forEach(function(lang, title) {
          if (lang === '_') {
            l.titles['default'] = title;
          } else {
            l.titles[lang] = title;
          }
        }, { flatten: true });
      }
      
      if (link.properties.length > 0) {
        l.properties = {};
        link.properties.forEach(function(key, value) {
          l.properties[key] = value;
        }, { flatten: true });
      }
      
      obj.links.push(l);
    });
  }
  
  return JSON.stringify(obj);
}
727625
public static String listToJson(List<?> list) {
        JSONArray array = new JSONArray();
        if (Checker.isNotEmpty(list)) {
            array.addAll(list);
        }
        return formatJson(array.toString());
    }
329242
<V> String toJson(final DataTypeDescriptor<V> descriptor, final V arg) {
		String s = format.write(arg, descriptor, false);
		TypeEnum type = descriptor.getType();
		if (type == TypeEnum.STRING || type == TypeEnum.ENUM || type == TypeEnum.DATETIME) {
			// Remove the quotes.
			s = s.substring(1, s.length() - 1);
		}

		return s;
	}