# IFC parsing in node.js

**URL:** <https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026>\
**Category:** Developers\
**Created:** [October 8, 2020, 1:19pm UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026 "2020-10-08T13:19:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![gasi2](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@gasi2](https://forums.buildingsmart.org/u/gasi2)\
**Post date:** [October 8, 2020, 1:19pm UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/1 "2020-10-08T13:19:36Z")

</div>

Hello,  
Newbie question:  
Is there a way to parse ifc file in node.js? or convert ifc to json in node.js?  
Thanks,  
Asi

---

<div class="post-metadata">

**Author:** ![jbrouwer](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@jbrouwer](https://forums.buildingsmart.org/u/jbrouwer)\
**Post date:** [October 9, 2020, 5:38am UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/2 "2020-10-09T05:38:01Z")

</div>

Hi Asi,

You could take a look at our ifc json project, it’s still a work in progress but you even might be able to contribute something.  
Look for IFCJSON-Team and IFC2JSON\_python on Github.

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![gasi2](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@gasi2](https://forums.buildingsmart.org/u/gasi2)\
**Post date:** [October 11, 2020, 5:24am UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/3 "2020-10-11T05:24:04Z")

</div>

@jbrouwer - Thanks a lot. will take a look.

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [October 11, 2020, 10:15pm UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/4 "2020-10-11T22:15:14Z")

</div>

If you’re looking for a graphical BIM authoring tool which supports IFCJSON, the [BlenderBIM Add-on](https://blenderbim.org) supports both IFCJSON v4 and v5.

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [October 11, 2020, 10:18pm UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/5 "2020-10-11T22:18:19Z")

</div>

Oh, and I think @ian might have support for typescript in [IFC-gen](https://github.com/hypar-io/IFC-gen), but I didn’t look too closely 🙂

---

<div class="post-metadata">

**Author:** ![eruiz](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@eruiz](https://forums.buildingsmart.org/u/eruiz)\
**Post date:** [October 21, 2020, 9:13am UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/6 "2020-10-21T09:13:25Z")

</div>

Hi,  
I recommend you to use IFC2JSON or Geometry gym, which has a function in database class to convert to JSON. I am working in a similar project and I didn’t found another option. I hope that building smart work harder in this topic.

---

<div class="post-metadata">

**Author:** ![devonsparks](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/devonsparks/32/539_2.png) [@devonsparks](https://forums.buildingsmart.org/u/devonsparks)\
**Post date:** [November 8, 2020, 5:11pm UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/7 "2020-11-08T17:11:37Z")

</div>

@eruiz, @gasi2 - as we look to evolve JSON-based serializations for IFC, it’d be great to get feedback on your intended use cases and needs, if you’re willing 🙂

Possible questions include:

- Would you like JSON serializations of both IFC instance files and the IFC schema?
- Do you have a use for validation of IFC JSON instances, ala JSON Schema?
- In considering use of a JSON serialization of IFC, how would you rate the relative importance of the following (on a scale of _Not Important, Somewhat Important, Very Important, Critical_):  
– Human readability  
– Small file size  
– Round-tripping support with IFC-SFP and/or ifcXML  
– support for linked data (e.g., via JSON-LD)
- What use cases do you intend to use IFC JSON for? Why might it fit your needs better than alternative serializations?
- Any feedback on the [draft specs](https://github.com/IFCJSON-Team/IFC.JSON-4) as they exist today? (Feel free to post those to the [IFCJSON Github Issues](https://github.com/IFCJSON-Team/IFC.JSON-4/issues))

Thanks!

---

<div class="post-metadata">

**Author:** ![andrewisen](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/andrewisen/32/1474_2.png) [@andrewisen](https://forums.buildingsmart.org/u/andrewisen)\
**Post date:** [December 2, 2020, 6:07am UTC](https://forums.buildingsmart.org/t/ifc-parsing-in-node-js/3026/8 "2020-12-02T06:07:44Z")

</div>

You can do a “dirty parse” relatively easy.  
In other words:

> If you know what you’re looking for, you can skip the rest

I’m currently building a parser that handles `User Defined IFC Property Sets`.  
The logic behind my code is somewhat “dirty”. I **DO NOT** build the entire IFC schema/relationship. Instead, I only implement `IfcPropertySingleValue`, `IfcRelDefinesByProperties`, and `IfcPropertySet`.

You can take a look at my [GitHub Repo](https://github.com/andrewisen/bim-whale) for more info.

**Best regards**  
André Wisén
