fixed string bug

This commit is contained in:
Tony Tam 2012-12-26 20:02:03 -08:00
parent 9d014e89bc
commit f329b94625
3 changed files with 10 additions and 3 deletions

View File

@ -5,11 +5,17 @@
<artifactId>swagger-client</artifactId>
<packaging>jar</packaging>
<name>swagger-client</name>
<version>1.0</version>
<version>1.0.0</version>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
<distributionManagement>
<repository>
<id>com.wordnik</id>
<name>wordnik-ci-aws</name>
<url>https://ci.aws.wordnik.com/artifactory/m2-snapshots/</url>
</repository>
</distributionManagement>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>

View File

@ -41,7 +41,8 @@ object ApiInvoker {
}
def deserialize(json: String, containerType: String, cls: Class[_]) = {
if (cls == classOf[String]) {
println("deserializing " + json)
if (cls == classOf[String] && containerType == null) {
json match {
case s: String => {
if (s.startsWith("\"") && s.endsWith("\"") && s.length > 1) s.substring(1, s.length - 2)