Skip to content

Instantly share code, notes, and snippets.

@dvhp
Created April 22, 2018 07:28
Show Gist options
  • Save dvhp/d1be8a8bebad9f0539b4a50b16374cd8 to your computer and use it in GitHub Desktop.
Save dvhp/d1be8a8bebad9f0539b4a50b16374cd8 to your computer and use it in GitHub Desktop.
dsl-json error
:app:kaptDebugKotlin
w: Note: Notify: PROCESS for [com.dslplatform.compiler.client.parameters.Help@6b6b9fa, com.dslplatform.compiler.client.parameters.PropertiesFile@4570fe90, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE, INSTANCE]
w: Note: Running: mono --version
w: Note: Notify: EXEC for java.lang.ProcessBuilder@4efa8c7e
w: Note: Running: mono /Users/xxx/.DSL-Platform/dsl-compiler.exe
w: Note: Notify: EXEC for java.lang.ProcessBuilder@5b7fae7c
w: Note: Checking for latest compiler version due to download option
w: Note: Checking last modified info for dsl-compiler.zip from DSL Platform...
w: Note: dsl-compiler.exe at latest version (2018-04-19)
w: Note: Compiling DSL to java_external_json...
w: Note: Notify: DSL for [target=java_external_json, namespace=dsl_json, settings=manual-json, settings=source-only, library=1.5.0, dsl=/var/folders/yv/jkk14gfx6p7cx90mfsbkky4c0000gn/T/annotation-4944804444815585765.dsl, path=/removed]
w: Note: Running: mono --version
w: Note: Notify: EXEC for java.lang.ProcessBuilder@5e7350c5
w: Note: Running: mono /Users/xxx/.DSL-Platform/dsl-compiler.exe target=java_external_json namespace=dsl_json settings=manual-json settings=source-only library=1.5.0 dsl=/var/folders/yv/jkk14gfx6p7cx90mfsbkky4c0000gn/T/annotation-4944804444815585765.dsl path=/removed
w: Note: Notify: EXEC for java.lang.ProcessBuilder@94ff89d
w: Note: <ArrayOfKeyValueOfstringstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><KeyValueOfstringstring><Key>dsl_json.json.ExternalSerialization</Key><Value>/*&#xD;
* Created by DSL Platform&#xD;
* v2.1.6683.33143 &#xD;
*/&#xD;
&#xD;
package dsl_json.json;&#xD;
&#xD;
&#xD;
&#xD;
public class ExternalSerialization implements com.dslplatform.json.Configuration {&#xD;
&#xD;
@SuppressWarnings("unchecked")
public void configure(final com.dslplatform.json.DslJson json) {
setup(json);
}
@SuppressWarnings("unchecked")
public static void setup(final com.dslplatform.json.DslJson json) {
&#xD;
json.registerReader(com.vp.weatherapp.data.local.fts.CityJson.class, JSON_READER_struct0);&#xD;
w: Note:
json.registerWriter(com.vp.weatherapp.data.local.fts.CityJson.class, new com.dslplatform.json.JsonWriter.WriteObject&lt;com.vp.weatherapp.data.local.fts.CityJson&gt;() {&#xD;
@Override&#xD;
public void write(com.dslplatform.json.JsonWriter writer, com.vp.weatherapp.data.local.fts.CityJson value) {&#xD;
serialize(value, writer, json.omitDefaults);&#xD;
}&#xD;
});
&#xD;
json.registerBinder(com.vp.weatherapp.data.local.fts.CityJson.class, JSON_BINDER_struct0);
&#xD;
json.registerReader(com.vp.weatherapp.data.local.fts.CoordJson.class, JSON_READER_struct1);&#xD;
json.registerWriter(com.vp.weatherapp.data.local.fts.CoordJson.class, new com.dslplatform.json.JsonWriter.WriteObject&lt;com.vp.weatherapp.data.local.fts.CoordJson&gt;() {&#xD;
@Override&#xD;
public void write(com.dslplatform.json.JsonWriter writer, com.vp.weatherapp.data.local.fts.CoordJson value) {&#xD;
serialize(value, writer, json.omitDefaults);&#xD;
}&#xD;
});
&#xD;
json.registerBinder(com.vp.weatherapp.data.local.fts.CoordJson.class, JSON_BINDER_struct1);
}&#xD;
&#xD;
public static void serialize(final com.vp.weatherapp.data.local.fts.CityJson self, final com.dslplatform.json.JsonWriter sw, final boolean minimal) {&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_START);&#xD;
if (minimal) {&#xD;
__serializeJsonObjectMinimal(self, sw, false);&#xD;
} else {&#xD;
__serializeJsonObjectFull(self, sw, false);&#xD;
}&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);&#xD;
}&#xD;
&#xD;
static void __serializeJsonObjectMinimal(final com.vp.weatherapp.data.local.fts.CityJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {&#xD;
&#xD;
&#xD;
if (!(self.getCountry().length() == 0)){&#xD;
hasWrittenProperty = true;&#xD;
sw.writeAscii("\"country\":", 10);&#xD;
sw.writeString(self.getCountry());&#xD;
}&#xD;
&#xD;
&#xD;
w: Note:
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);&#xD;
sw.writeAscii("\"coord\":{", 9);&#xD;
&#xD;
dsl_json.json.ExternalSerialization.__serializeJsonObjectMinimal(self.getCoord(), sw, false);&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);&#xD;
&#xD;
if (!(self.getName().length() == 0)){&#xD;
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);&#xD;
hasWrittenProperty = true;&#xD;
sw.writeAscii("\"name\":", 7);&#xD;
sw.writeString(self.getName());&#xD;
}&#xD;
&#xD;
if (self.getId() != 0L){&#xD;
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);&#xD;
hasWrittenProperty = true;&#xD;
sw.writeAscii("\"id\":", 5);&#xD;
com.dslplatform.json.NumberConverter.serialize(self.getId(), sw);&#xD;
}&#xD;
}&#xD;
&#xD;
static void __serializeJsonObjectFull(final com.vp.weatherapp.data.local.fts.CityJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {&#xD;
&#xD;
&#xD;
&#xD;
sw.writeAscii("\"country\":", 10);&#xD;
sw.writeString(self.getCountry());&#xD;
&#xD;
&#xD;
sw.writeAscii(",\"coord\":{", 10);&#xD;
&#xD;
dsl_json.json.ExternalSerialization.__serializeJsonObjectFull(self.getCoord(), sw, false);&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);&#xD;
&#xD;
&#xD;
sw.writeAscii(",\"name\":", 8);&#xD;
sw.writeString(self.getName());&#xD;
&#xD;
&#xD;
sw.writeAscii(",\"id\":", 6);&#xD;
com.dslplatform.json.NumberConverter.serialize(self.getId(), sw);&#xD;
}&#xD;
&#xD;
public static final com.dslplatform.json.JsonReader.ReadObject&lt;com.vp.weatherapp.data.local.fts.CityJson&gt; JSON_READER_struct0 = new com.dslplatform.json.JsonReader.ReadObject&lt;com.vp.weatherapp.data.local.fts.CityJson&gt;() {&#xD;
@SuppressWarnings("unchecked")&#xD;
@Override&#xD;
public com.vp.weatherapp.data.local.fts.CityJson read(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
if(reader.last() != '{') {&#xD;
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());&#xD;
}&#xD;
reader.getNextToken();&#xD;
final com.vp.weatherapp.data.local.fts.CityJson instance = new com.vp.weatherapp.data.local.fts.CityJson();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
};&#xD;
&#xD;
@SuppressWarnings("unchecked")&#xD;
static com.vp.weatherapp.data.local.fts.CityJson deserializestruct0(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
final com.vp.weatherapp.data.local.fts.CityJson instance = new com.vp.weatherapp.data.local.fts.CityJson();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
&#xD;
@SuppressWarnings("unchecked")&#xD;
static void deserialize(final com.vp.weatherapp.data.local.fts.CityJson instance, final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
&#xD;
String _country_ = "";&#xD;
com.vp.weatherapp.data.local.fts.CoordJson _coord_ = null;&#xD;
String _name_ = "";&#xD;
long _id_ = 0L;&#xD;
byte nextToken = reader.last();&#xD;
if(nextToken != '}') {&#xD;
int nameHash = reader.fillName();&#xD;
nextToken = reader.getNextToken();&#xD;
switch(nameHash) {&#xD;
&#xD;
case -1517218351:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property country does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_country_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 230940782:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
nextToken = reader.getNextToken();&#xD;
break;&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
&#xD;
if (nextToken == '{') {&#xD;
reader.getNextToken();&#xD;
_coord_ = deserializestruct1(reader);&#xD;
nextToken = reader.getNextToken();&#xD;
} else throw new java.io.IOException("Expecting '{' at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
break;&#xD;
case -1925595674:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property name does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_name_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 926444256:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property id does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_id_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
default:&#xD;
nextToken = reader.skip(); &#xD;
break;&#xD;
}&#xD;
while (nextToken == ',') {&#xD;
nextToken = reader.getNextToken();&#xD;
nameHash = reader.fillName();&#xD;
nextToken = reader.getNextToken();&#xD;
switch(nameHash) {&#xD;
&#xD;
case -1517218351:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property country does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_country_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 230940782:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
nextToken = reader.getNextToken();&#xD;
break;&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
&#xD;
if (nextToken == '{') {&#xD;
reader.getNextToken();&#xD;
_coord_ = deserializestruct1(reader);&#xD;
nextToken = reader.getNextToken();&#xD;
} else throw new java.io.IOException("Expecting '{' at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
break;&#xD;
case -1925595674:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property name does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_name_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 926444256:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property id does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_id_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
nextToken = reader.ge
w: Note: tNextToken();&#xD;
break;&#xD;
default:&#xD;
nextToken = reader.skip(); &#xD;
break;&#xD;
}&#xD;
}&#xD;
if (nextToken != '}') {&#xD;
throw new java.io.IOException("Expecting '}' at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
}&#xD;
&#xD;
instance.setCountry(_country_);&#xD;
instance.setCoord(_coord_);&#xD;
instance.setName(_name_);&#xD;
instance.setId(_id_);&#xD;
}&#xD;
&#xD;
public static final com.dslplatform.json.JsonReader.BindObject&lt;com.vp.weatherapp.data.local.fts.CityJson&gt; JSON_BINDER_struct0 = new com.dslplatform.json.JsonReader.BindObject&lt;com.vp.weatherapp.data.local.fts.CityJson&gt;() {&#xD;
@SuppressWarnings("unchecked")&#xD;
@Override&#xD;
public com.vp.weatherapp.data.local.fts.CityJson bind(final com.dslplatform.json.JsonReader reader, final com.vp.weatherapp.data.local.fts.CityJson instance) throws java.io.IOException {&#xD;
if(reader.last() != '{') {&#xD;
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());&#xD;
}&#xD;
reader.getNextToken();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
};&#xD;
&#xD;
public static void serialize(final com.vp.weatherapp.data.local.fts.CoordJson self, final com.dslplatform.json.JsonWriter sw, final boolean minimal) {&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_START);&#xD;
if (minimal) {&#xD;
__serializeJsonObjectMinimal(self, sw, false);&#xD;
} else {&#xD;
__serializeJsonObjectFull(self, sw, false);&#xD;
}&#xD;
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);&#xD;
}&#xD;
&#xD;
static void __serializeJsonObjectMinimal(final com.vp.weatherapp.data.local.fts.CoordJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {&#xD;
&#xD;
&#xD;
if (self.getLon() != 0.0){&#xD;
hasWrittenProperty = true;&#xD;
sw.writeAscii("\"lon\":", 6);&#xD;
com.dslplatform.json.NumberConverter.serialize(self.getLon(), sw);&#xD;
}&#xD;
&#xD;
if (self.getLat() != 0.0){&#xD;
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);&#xD;
hasWrittenProperty = true;&#xD;
sw.writeAscii("\"lat\":", 6);&#xD;
com.dslplatform.json.NumberConverter.serialize(self.getLat(), sw);&#xD;
}&#xD;
}&#xD;
&#xD;
static void __serializeJsonObjectFull(final com.vp.weatherapp.data.local.fts.CoordJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {&#xD;
&#xD;
&#xD;
&#xD;
sw.writeAscii("\"lon\":", 6);&#xD;
com.dslplatform.json.NumberConverter.serialize(self.getLon(), sw);&#xD;
&#xD;
&#xD;
sw.writeAscii(",\"lat\":", 7);&#xD;
w: Note:
com.dslplatform.json.NumberConverter.serialize(self.getLat(), sw);&#xD;
}&#xD;
&#xD;
public static final com.dslplatform.json.JsonReader.ReadObject&lt;com.vp.weatherapp.data.local.fts.CoordJson&gt; JSON_READER_struct1 = new com.dslplatform.json.JsonReader.ReadObject&lt;com.vp.weatherapp.data.local.fts.CoordJson&gt;() {&#xD;
@SuppressWarnings("unchecked")&#xD;
@Override&#xD;
public com.vp.weatherapp.data.local.fts.CoordJson read(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
if(reader.last() != '{') {&#xD;
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());&#xD;
}&#xD;
reader.getNextToken();&#xD;
w: Note:
final com.vp.weatherapp.data.local.fts.CoordJson instance = new com.vp.weatherapp.data.local.fts.CoordJson();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
};&#xD;
&#xD;
@SuppressWarnings("unchecked")&#xD;
static com.vp.weatherapp.data.local.fts.CoordJson deserializestruct1(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
final com.vp.weatherapp.data.local.fts.CoordJson instance = new com.vp.weatherapp.data.local.fts.CoordJson();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
&#xD;
@SuppressWarnings("unchecked")&#xD;
static void deserialize(final com.vp.weatherapp.data.local.fts.CoordJson instance, final com.dslplatform.json.JsonReader reader) throws java.io.IOException {&#xD;
&#xD;
double _lon_ = 0.0;&#xD;
double _lat_ = 0.0;&#xD;
byte nextToken = reader.last();&#xD;
if(nextToken != '}') {&#xD;
int nameHash = reader.fillName();&#xD;
nextToken = reader.getNextToken();&#xD;
switch(nameHash) {&#xD;
&#xD;
case 911295270:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property lon does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_lon_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 1348499102:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property lat does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_lat_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
default:&#xD;
nextToken = reader.skip(); &#xD;
break;&#xD;
}&#xD;
while (nextToken == ',') {&#xD;
nextToken = reader.getNextToken();&#xD;
nameHash = reader.fillName();&#xD;
nextToken = reader.getNextToken();&#xD;
switch(nameHash) {&#xD;
&#xD;
case 911295270:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property lon does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_lon_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
case 1348499102:&#xD;
if(nextToken == 'n') {&#xD;
if (reader.wasNull()) {&#xD;
throw new java.io.IOException("Property lat does not allow null. null value detected at position " + reader.positionInStream());&#xD;
}&#xD;
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
_lat_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();&#xD;
break;&#xD;
default:&#xD;
nextToken = reader.skip(); &#xD;
break;&#xD;
}&#xD;
}&#xD;
if (nextToken != '}') {&#xD;
throw new java.io.IOException("Expecting '}' at position " + reader.positionInStream() + ". Found " + (char)nextToken);&#xD;
}&#xD;
}&#xD;
&#xD;
instance.setLon(_lon_);&#xD;
instance.setLat(_lat_);&#xD;
}&#xD;
&#xD;
public static final com.dslplatform.json.JsonReader.BindObject&lt;com.vp.weatherapp.data.local.fts.CoordJson&gt; JSON_BINDER_struct1 = new com.dslplatform.json.JsonReader.BindObject&lt;com.vp.weatherapp.data.local.fts.CoordJson&gt;() {&#xD;
@SuppressWarnings("unchecked")&#xD;
@Override&#xD;
public com.vp.weatherapp.data.local.fts.CoordJson bind(final com.dslplatform.json.JsonReader reader, final com.vp.weatherapp.data.local.fts.CoordJson instance) throws java.io.IOException {&#xD;
if(reader.last() != '{') {&#xD;
w: Note:
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());&#xD;
}&#xD;
reader.getNextToken();&#xD;
deserialize(instance, reader);&#xD;
return instance;&#xD;
}&#xD;
};&#xD;
}&#xD;
</Value></KeyValueOfstringstring></ArrayOfKeyValueOfstringstring>
w: Note: Notify: SOURCES for {dsl_json.json.ExternalSerialization=/*
* Created by DSL Platform
* v2.1.6683.33143
*/
package dsl_json.json;
public class ExternalSerialization implements com.dslplatform.json.Configuration {
@SuppressWarnings("unchecked")
public void configure(final com.dslplatform.json.DslJson json) {
setup(json);
}
@SuppressWarnings("unchecked")
public static void setup(final com.dslplatform.json.DslJson json) {
json.registerReader(com.vp.weatherapp.data.local.fts.CityJson.class, JSON_READER_struct0);
json.registerWriter(com.vp.weatherapp.data.local.fts.CityJson.class, new com.dslplatform.json.JsonWriter.WriteObject<com.vp.weatherapp.data.local.fts.CityJson>() {
@Override
public void write(com.dslplatform.json.JsonWriter writer, com.vp.weatherapp.data.local.fts.CityJson value) {
serialize(value, writer, json.omitDefaults);
}
});
json.registerBinder(com.vp.weatherapp.data.local.fts.CityJson.class, JSON_BINDER_struct0);
json.registerReader(com.vp.weatherapp.data.local.fts.CoordJson.class, JSON_READER_struct1);
json.registerWriter(com.vp.weatherapp.data.local.fts.CoordJson.class, new com.dslplatform.json.JsonWriter.WriteObject<com.vp.weatherapp.data.local.fts.CoordJson>() {
@Override
public void write(com.dslplatform.json.JsonWriter writer, com.vp.weatherapp.data.local.fts.CoordJson value) {
serialize(value, writer, json.omitDefaults);
}
});
json.registerBinder(com.vp.weatherapp.data.local.fts.CoordJson.class, JSON_BINDER_struct1);
}
public static void serialize(final com.vp.weatherapp.data.local.fts.CityJson self, final com.dslplatform.json.JsonWriter sw, final boolean minimal) {
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_START);
if (minimal) {
__serializeJsonObjectMinimal(self, sw, false);
} else {
__serializeJsonObjectFull(self, sw, false);
}
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);
}
static void __serializeJsonObjectMinimal(final com.vp.weatherapp.data.local.fts.CityJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {
if (!(self.getCountry().length() == 0)){
hasWrittenProperty = true;
sw.writeAscii("\"country\":", 10);
sw.writeString(self.getCountry());
}
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);
sw.writeAscii("\"coord\":{", 9);
dsl_json.json.ExternalSerialization.__serializeJsonObjectMinimal(self.getCoord(), sw, false);
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);
if (!(self.getName().length() == 0)){
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);
hasWrittenProperty = true;
sw.writeAscii("\"name\":", 7);
sw.writeString(self.getName());
}
if (self.getId() != 0L){
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);
hasWrittenProperty = true;
sw.writeAscii("\"id\":", 5);
com.dslplatform.json.NumberConverter.serialize(self.getId(), sw);
}
}
static void __serializeJsonObjectFull(final com.vp.weatherapp.data.local.fts.CityJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {
sw.writeAscii("\"country\":", 10);
sw.writeString(self.getCountry());
sw.writeAscii(",\"coord\":{", 10);
dsl_json.json.ExternalSerialization.__serializeJsonObjectFull(self.getCoord(), sw, false);
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);
sw.writeAscii(",\"name\":", 8);
sw.writeString(self.getName());
sw.writeAscii(",\"id\":", 6);
com.dslplatform.json.NumberConverter.serialize(self.getId(), sw);
}
public static final com.dslplatform.json.JsonReader.ReadObject<com.vp.weatherapp.data.local.fts.CityJson> JSON_READER_struct0 = new com.dslplatform.json.JsonReader.ReadObject<com.vp.weatherapp.data.local.fts.CityJson>() {
@SuppressWarnings("unchecked")
@Override
public com.vp.weatherapp.data.local.fts.CityJson read(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
if(reader.last() != '{') {
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());
}
reader.getNextToken();
final com.vp.weatherapp.data.local.fts.CityJson instance = new com.vp.weatherapp.data.local.fts.CityJson();
deserialize(instance, reader);
return instance;
}
};
@SuppressWarnings("unchecked")
static com.vp.weatherapp.data.local.fts.CityJson deserializestruct0(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
final com.vp.weatherapp.data.local.fts.CityJson instance = new com.vp.weatherapp.data.local.fts.CityJson();
deserialize(instance, reader);
return instance;
}
@SuppressWarnings("unchecked")
static void deserialize(final com.vp.weatherapp.data.local.fts.CityJson instance, final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
String _country_ = "";
com.vp.weatherapp.data.local.fts.CoordJson _coord_ = null;
String _name_ = "";
long _id_ = 0L;
byte nextToken = reader.last();
if(nextToken != '}') {
int nameHash = reader.fillName();
nextToken = reader.getNextToken();
switch(nameHash) {
case -1517218351:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property country does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_country_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();
break;
case 230940782:
if(nextToken == 'n') {
if (reader.wasNull()) {
nextToken = reader.getNextToken();
break;
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
if (nextToken == '{') {
reader.getNextToken();
_coord_ = deserializestruct1(reader);
nextToken = reader.getNextToken();
} else throw new java.io.IOException("Expecting '{' at position " + reader.positionInStream() + ". Found " + (char)nextToken);
break;
case -1925595674:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property name does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_name_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();
break;
case 926444256:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property id does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_id_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
nextToken = reader.getNextToken();
break;
default:
nextToken = reader.skip();
break;
}
while (nextToken == ',') {
nextToken = reader.getNextToken();
nameHash = reader.fillName();
nextToken = reader.getNextToken();
switch(nameHash) {
case -1517218351:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property country does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_country_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();
break;
case 230940782:
if(nextToken == 'n') {
if (reader.wasNull()) {
nextToken = reader.getNextToken();
break;
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
if (nextToken == '{') {
reader.getNextToken();
_coord_ = deserializestruct1(reader);
nextToken = reader.getNextToken();
} else throw new java.io.IOException("Expecting '{' at position " + reader.positionInStream() + ". Found " + (char)nextToken);
break;
case -1925595674:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property name does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_name_ = com.dslplatform.json.StringConverter.deserialize(reader);
nextToken = reader.getNextToken();
break;
case 926444256:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property id does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_id_ = com.dslplatform.json.NumberConverter.deserializeLong(reader);
nextToken = reader.getNextToken();
break;
default:
nextToken = reader.skip();
break;
}
}
if (nextToken != '}') {
throw new java.io.IOException("Expecting '}' at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
}
instance.setCountry(_country_);
instance.setCoord(_coord_);
instance.setName(_name_);
instance.setId(_id_);
}
public static final com.dslplatform.json.JsonReader.BindObject<com.vp.weatherapp.data.local.fts.CityJson> JSON_BINDER_struct0 = new com.dslplatform.json.JsonReader.BindObject<com.vp.weatherapp.data.local.fts.CityJson>() {
@SuppressWarnings("unchecked")
@Override
public com.vp.weatherapp.data.local.fts.CityJson bind(final com.dslplatform.json.JsonReader reader, final com.vp.weatherapp.data.local.fts.CityJson instance) throws java.io.IOException {
if(reader.last() != '{') {
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());
}
reader.getNextToken();
deserialize(instance, reader);
return instance;
}
};
public static void serialize(final com.vp.weatherapp.data.local.fts.CoordJson self, final com.dslplatform.json.JsonWriter sw, final boolean minimal) {
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_START);
if (minimal) {
__serializeJsonObjectMinimal(self, sw, false);
} else {
__serializeJsonObjectFull(self, sw, false);
}
sw.writeByte(com.dslplatform.json.JsonWriter.OBJECT_END);
}
static void __serializeJsonObjectMinimal(final com.vp.weatherapp.data.local.fts.CoordJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {
if (self.getLon() != 0.0){
hasWrittenProperty = true;
sw.writeAscii("\"lon\":", 6);
com.dslplatform.json.NumberConverter.serialize(self.getLon(), sw);
}
if (self.getLat() != 0.0){
if(hasWrittenProperty) sw.writeByte(com.dslplatform.json.JsonWriter.COMMA);
hasWrittenProperty = true;
sw.writeAscii("\"lat\":", 6);
com.dslplatform.json.NumberConverter.serialize(self.getLat(), sw);
}
}
static void __serializeJsonObjectFull(final com.vp.weatherapp.data.local.fts.CoordJson self, com.dslplatform.json.JsonWriter sw, boolean hasWrittenProperty) {
sw.writeAscii("\"lon\":", 6);
com.dslplatform.json.NumberConverter.serialize(self.getLon(), sw);
sw.writeAscii(",\"lat\":", 7);
com.dslplatform.json.NumberConverter.serialize(self.getLat(), sw);
}
public static final com.dslplatform.json.JsonReader.ReadObject<com.vp.weatherapp.data.local.fts.CoordJson> JSON_READER_struct1 = new com.dslplatform.json.JsonReader.ReadObject<com.vp.weatherapp.data.local.fts.CoordJson>() {
@SuppressWarnings("unchecked")
@Override
public com.vp.weatherapp.data.local.fts.CoordJson read(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
if(reader.last() != '{') {
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());
}
reader.getNextToken();
final com.vp.weatherapp.data.local.fts.CoordJson instance = new com.vp.weatherapp.data.local.fts.CoordJson();
deserialize(instance, reader);
return instance;
}
};
@SuppressWarnings("unchecked")
static com.vp.weatherapp.data.local.fts.CoordJson deserializestruct1(final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
final com.vp.weatherapp.data.local.fts.CoordJson instance = new com.vp.weatherapp.data.local.fts.CoordJson();
deserialize(instance, reader);
return instance;
}
@SuppressWarnings("unchecked")
static void deserialize(final com.vp.weatherapp.data.local.fts.CoordJson instance, final com.dslplatform.json.JsonReader reader) throws java.io.IOException {
double _lon_ = 0.0;
double _lat_ = 0.0;
byte nextToken = reader.last();
if(nextToken != '}') {
int nameHash = reader.fillName();
nextToken = reader.getNextToken();
switch(nameHash) {
case 911295270:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property lon does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_lon_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();
break;
case 1348499102:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property lat does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_lat_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();
break;
default:
nextToken = reader.skip();
break;
}
while (nextToken == ',') {
nextToken = reader.getNextToken();
nameHash = reader.fillName();
nextToken = reader.getNextToken();
switch(nameHash) {
case 911295270:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property lon does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_lon_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();
break;
case 1348499102:
if(nextToken == 'n') {
if (reader.wasNull()) {
throw new java.io.IOException("Property lat does not allow null. null value detected at position " + reader.positionInStream());
}
throw new java.io.IOException("Expecting 'u' (as null) at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
_lat_ = com.dslplatform.json.NumberConverter.deserializeDouble(reader);
nextToken = reader.getNextToken();
break;
default:
nextToken = reader.skip();
break;
}
}
if (nextToken != '}') {
throw new java.io.IOException("Expecting '}' at position " + reader.positionInStream() + ". Found " + (char)nextToken);
}
}
instance.setLon(_lon_);
instance.setLat(_lat_);
}
public static final com.dslplatform.json.JsonReader.BindObject<com.vp.weatherapp.data.local.fts.CoordJson> JSON_BINDER_struct1 = new com.dslplatform.json.JsonReader.BindObject<com.vp.weatherapp.data.local.fts.CoordJson>() {
@SuppressWarnings("unchecked")
@Override
public com.vp.weatherapp.data.local.fts.CoordJson bind(final com.dslplatform.json.JsonReader reader, final com.vp.weatherapp.data.local.fts.CoordJson instance) throws java.io.IOException {
if(reader.last() != '{') {
throw new java.io.IOException("Expecting \'{\' at position " + reader.positionInStream() + ". Found " + (char)reader.last());
}
reader.getNextToken();
deserialize(instance, reader);
return instance;
}
};
}
}
w: Note: Saving file: /var/folders/yv/jkk14gfx6p7cx90mfsbkky4c0000gn/T/DSL-Platform/daresay/JAVA_EXTERNAL_JSON/dsl_json/json/ExternalSerialization.java
w: Note: Notify: TARGET for java_external_json
e: error: Failed saving compiled json serialization files
:app:kaptDebugKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> Compilation error. See log for more details
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: Internal compiler error. See log for more details
at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.throwGradleExceptionIfError(tasksUtils.kt:17)
at org.jetbrains.kotlin.gradle.internal.KaptTask.compile(KaptTask.kt:122)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
... 29 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment