-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change error store to be part of configuration instead (#39)
* Change error store to be part of configuration instead * Revert to provider providing list of error stores * merge master, reformat, align mocks stores to lowercase type * Remove extra parantheses * Format code to follow style * Format code to follow style
- Loading branch information
1 parent
f389983
commit 5ac4b9c
Showing
19 changed files
with
286 additions
and
116 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
27 changes: 27 additions & 0 deletions
27
ingestion/src/main/java/feast/ingestion/util/JsonUtil.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package feast.ingestion.util; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.reflect.TypeToken; | ||
import java.lang.reflect.Type; | ||
import java.util.Collections; | ||
import java.util.Map; | ||
|
||
public class JsonUtil { | ||
|
||
private static Gson gson = new Gson(); | ||
|
||
/** | ||
* Unmarshals a given json string to map | ||
* | ||
* @param jsonString valid json formatted string | ||
* @return map of keys to values in json | ||
*/ | ||
public static Map<String, String> convertJsonStringToMap(String jsonString) { | ||
if (jsonString == null || jsonString.equals("") || jsonString.equals("{}")) { | ||
return Collections.emptyMap(); | ||
} | ||
Type stringMapType = new TypeToken<Map<String, String>>() { | ||
}.getType(); | ||
return gson.fromJson(jsonString, stringMapType); | ||
} | ||
} |
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
Oops, something went wrong.