Created
June 12, 2016 17:53
-
-
Save 837/bcdec78bb9efa6e187e076e8b895f176 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.reflect.Type; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonParseException; | |
import javafx.beans.property.SimpleStringProperty; | |
public class SimpleStringPropertyDeserializer implements JsonDeserializer<SimpleStringProperty> { | |
@Override | |
public SimpleStringProperty deserialize(JsonElement json, Type srcType, JsonDeserializationContext context) | |
throws JsonParseException { | |
return new SimpleStringProperty(json.getAsJsonPrimitive().getAsString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment