Question: I am working on a project where I'm creating lots, (potentially x,000,000s) of images.

When they are created, they are created on the fly and are blobs. e.g.

```
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO... etc

```

Is it safe and efficient to save them as they are in MySQL or would you recommend saving them as actual images in a directory then storing just the path? And why?

Completely new to me this so kind of a general question. I'm using PHP and MySQL db.

Answer: 
Try this code ->

```
JSONObject dObject = output.getJSONObject("d")

this.UserID = dObject.getInt("med_ID");
this.gebGUID = dObject.getString("geb_GUID"); // As your geb_GUID is String object

```
If you want to convert a json string into an object, you can use :

```
Type type = new TypeToken<HashMap<String, ArrayList<String>>>(){}.getType();
HashMap<String, ArrayList<String>> result = new Gson().fromJson(json, type);

```

You can change the type, in my case it was a `HashMap<String, ArrayList<String>>`.