consolidate json libraries

Patch by eevans; reviewed by jbellis for CASSANDRA-587

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@894259 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eric Evans 2009-12-28 22:20:52 +00:00
parent 95eb871750
commit cb828319c5
5 changed files with 7 additions and 11 deletions

View File

@ -209,8 +209,8 @@ dependencies that have separate copyright notices and license terms. Your
use of these libraries is subject to the terms and conditions of the
following licenses.
For lib/flexjson-1.7.jar, lib/google-collect-1.0-rc1.jar,
lib/clhm-production.jar, and lib/json_simple-1.1.jar:
For lib/google-collect-1.0-rc1.jar, lib/clhm-production.jar, and
lib/json_simple-1.1.jar:
While developed outside the ASF, these projects are also licensed under
the Apache License 2.0. The full text of the Apache License 2.0 can be

View File

@ -18,10 +18,7 @@ Written by Cliff Click and released as Public Domain.
This product makes use of JLine for console input (http://jline.sf.net).
Copyright (c) 2002-2006, Marc Prud'hommeaux <mwp1@cornell.edu>
JSON serialization provided by Flexjson (http://flexjson.sf.net).
Copyright 2007 Charlie Hubbard.
JSON parsing provided by json-simple (http://code.google.com/p/json-simple/).
JSON support provided by json-simple (http://code.google.com/p/json-simple/).
Copyright 2006-2009 Yidong Fang.
This product makes use of the JUnit test framework (http://junit.org).

Binary file not shown.

View File

@ -34,8 +34,8 @@ import org.apache.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.transport.TSocket;
import org.json.simple.JSONValue;
import flexjson.JSONTokener;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
@ -72,7 +72,7 @@ public class RingCache
Cassandra.Client client = new Cassandra.Client(binaryProtocol);
socket.open();
Map<String,String> tokenToHostMap = (Map<String,String>) new JSONTokener(client.get_string_property(CassandraServer.TOKEN_MAP)).nextValue();
Map<String,String> tokenToHostMap = (Map<String,String>) JSONValue.parse(client.get_string_property(CassandraServer.TOKEN_MAP));
BiMap<Token, InetAddress> tokenEndpointMap = HashBiMap.create();
for (Map.Entry<String,String> entry : tokenToHostMap.entrySet())

View File

@ -36,8 +36,7 @@ import org.apache.cassandra.db.filter.QueryPath;
import org.apache.cassandra.service.StorageService;
import org.apache.cassandra.utils.Pair;
import org.apache.thrift.TException;
import flexjson.JSONSerializer;
import org.json.simple.JSONValue;
public class CassandraServer implements Cassandra.Iface
{
@ -529,7 +528,7 @@ public class CassandraServer implements Cassandra.Iface
}
else if (propertyName.equals(TOKEN_MAP))
{
return new JSONSerializer().serialize(storageService.getStringEndpointMap());
return JSONValue.toJSONString(storageService.getStringEndpointMap());
}
else if (propertyName.equals("version"))
{