# Is it possible to make SceneLoader to load object instead of string?

**URL:** <https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571>\
**Category:** Questions\
**Created:** [December 19, 2023, 1:04pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571 "2023-12-19T13:04:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhushan\_Wagh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bhushan_wagh/32/34147_2.png) [@Bhushan\_Wagh](https://forum.babylonjs.com/u/Bhushan_Wagh)\
**Post date:** [December 19, 2023, 1:04pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/1 "2023-12-19T13:04:16Z")

</div>

so basically I wanna pass scene data as object to SceneLoader.LoadAsync but it seems to accept string only, So we need to stringify the object and pass, since we are receiving json object of scene that we saving in index db. Currently we are patching babylon js package, so I also raise PR for the same if you want that and think this is useful.

---

<div class="post-metadata">

**Author:** ![srzerbetto](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/srzerbetto/32/20941_2.png) [@srzerbetto](https://forum.babylonjs.com/u/srzerbetto)\
**Post date:** [December 19, 2023, 1:53pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/2 "2023-12-19T13:53:11Z")

</div>

Hello @Bhushan_Wagh , how are you doing? I don’t think I fully understand you question. Is the JSON you are trying to send a GLB?

---

<div class="post-metadata">

**Author:** ![Bhushan\_Wagh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bhushan_wagh/32/34147_2.png) [@Bhushan\_Wagh](https://forum.babylonjs.com/u/Bhushan_Wagh)\
**Post date:** [December 19, 2023, 2:09pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/3 "2023-12-19T14:09:36Z")

</div>

Hi, I am good, thanks for asking. No, its not a glb, we are serialising the scene using babylon js serialiser and we saving that json in browser’s index db and when get retrieve this json to load it we need to stringify this json object to load using Scene loader.

---

<div class="post-metadata">

**Author:** ![srzerbetto](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/srzerbetto/32/20941_2.png) [@srzerbetto](https://forum.babylonjs.com/u/srzerbetto)\
**Post date:** [December 19, 2023, 2:23pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/4 "2023-12-19T14:23:04Z")

</div>

Right now it is not possible to load the object directly. That can be a feature request for the loader in the future. Adding @sebavan to the loop to get his thoughts on this.

---

<div class="post-metadata">

**Author:** ![Bhushan\_Wagh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bhushan_wagh/32/34147_2.png) [@Bhushan\_Wagh](https://forum.babylonjs.com/u/Bhushan_Wagh)\
**Post date:** [December 19, 2023, 2:43pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/5 "2023-12-19T14:43:19Z")

</div>

Yeah, I have added patch in babylon js from our side to make it work on our side and I was wondering if you guys would be interested in integrating this. If yes, then I can raise a PR for the same.

---

<div class="post-metadata">

**Author:** ![Roy\_Bernhard](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/roy_bernhard/32/38323_2.png) [@Roy\_Bernhard](https://forum.babylonjs.com/u/Roy_Bernhard)\
**Post date:** [March 14, 2024, 10:58pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/6 "2024-03-14T22:58:08Z")

</div>

Did anything come of this? We are planning on using babylon in our react native app but want to embed the gltf file vs having it load over the web (or loading it once and it stays cached even when the app is killed and re-opened). We are open to alternatives or even alternative file formats. Our app requires offline usage which is why we are looking for some help.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [March 19, 2024, 4:22pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-make-sceneloader-to-load-object-instead-of-string/46571/7 "2024-03-19T16:22:12Z")

</div>

Completely missed it the first time… @bghgary was planing on some loaders update I wonder if this was part of it ?
