Package com.google.gson

Examples of com.google.gson.JsonSyntaxException


    }
    catch (EOFException localEOFException)
    {
      if (i != 0)
        return JsonNull.INSTANCE;
      throw new JsonSyntaxException(localEOFException);
    }
    catch (MalformedJsonException localMalformedJsonException)
    {
      throw new JsonSyntaxException(localMalformedJsonException);
    }
    catch (IOException localIOException)
    {
      throw new JsonIOException(localIOException);
    }
    catch (NumberFormatException localNumberFormatException)
    {
      throw new JsonSyntaxException(localNumberFormatException);
    }
  }
View Full Code Here


            localBoundField.read(paramJsonReader, localObject);
        }
      }
      catch (IllegalStateException localIllegalStateException)
      {
        throw new JsonSyntaxException(localIllegalStateException);
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        throw new AssertionError(localIllegalAccessException);
      }
View Full Code Here

      Date localDate = this.format.parse(paramJsonReader.nextString());
      return new Time(localDate.getTime());
    }
    catch (ParseException localParseException)
    {
      throw new JsonSyntaxException(localParseException);
    }
  }
View Full Code Here

        {
          return this.iso8601Format.parse(paramString);
        }
        catch (ParseException localParseException3)
        {
          throw new JsonSyntaxException(paramString, localParseException3);
        }
      }
    }
  }
View Full Code Here

          paramJsonReader.beginArray();
          localObject1 = this.keyTypeAdapter.read(paramJsonReader);
          localObject2 = this.valueTypeAdapter.read(paramJsonReader);
          localObject3 = localMap.put(localObject1, localObject2);
          if (localObject3 != null)
            throw new JsonSyntaxException("duplicate key: " + localObject1);
          paramJsonReader.endArray();
        }
        paramJsonReader.endArray();
      }
      else
      {
        paramJsonReader.beginObject();
        while (paramJsonReader.hasNext())
        {
          JsonReaderInternalAccess.INSTANCE.promoteNameToValue(paramJsonReader);
          localObject1 = this.keyTypeAdapter.read(paramJsonReader);
          localObject2 = this.valueTypeAdapter.read(paramJsonReader);
          localObject3 = localMap.put(localObject1, localObject2);
          if (localObject3 != null)
            throw new JsonSyntaxException("duplicate key: " + localObject1);
        }
        paramJsonReader.endObject();
      }
      return localMap;
    }
View Full Code Here

      long l = this.format.parse(paramJsonReader.nextString()).getTime();
      return new java.sql.Date(l);
    }
    catch (ParseException localParseException)
    {
      throw new JsonSyntaxException(localParseException);
    }
  }
View Full Code Here

            localBoundField.read(paramJsonReader, localObject);
        }
      }
      catch (IllegalStateException localIllegalStateException)
      {
        throw new JsonSyntaxException(localIllegalStateException);
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        throw new AssertionError(localIllegalAccessException);
      }
View Full Code Here

      if (typeOfT instanceof Class) {
        metaDataClass = (Class) typeOfT;
      } else if (typeOfT instanceof ParameterizedType) {
        metaDataClass = (Class<?>) ((ParameterizedType) typeOfT).getRawType();
      } else {
        throw new JsonSyntaxException("Expecting MetaData, found: " + typeOfT);
      }
      GreazePreconditions.checkArgument(MetaDataBase.class.isAssignableFrom(metaDataClass));
      return MetaData.class.isAssignableFrom(metaDataClass) ?
          new MetaData(map) : new MetaDataBase(map);
    }
View Full Code Here

      try {
        synchronized (dateFormat) {
          return dateFormat.parse(jsonElement.getAsString());
        }
      } catch (ParseException e) {
        throw new JsonSyntaxException(jsonElement.getAsString(), e);
      }
    }
View Full Code Here

      if (isEmpty) {
        return JsonNull.INSTANCE;
      }
      throw new JsonIOException(e);
    } catch (MalformedJsonException e) {
      throw new JsonSyntaxException(e);
    } catch (IOException e) {
      throw new JsonIOException(e);
    } catch (NumberFormatException e) {
      throw new JsonSyntaxException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gson.JsonSyntaxException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.