https://github.com/kant2002/webidl-csharp
C# WebIDL parsing library
https://github.com/kant2002/webidl-csharp
webidl
Last synced: over 1 year ago
JSON representation
C# WebIDL parsing library
- Host: GitHub
- URL: https://github.com/kant2002/webidl-csharp
- Owner: kant2002
- License: mit
- Created: 2019-05-10T22:39:48.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T14:25:10.000Z (almost 4 years ago)
- Last Synced: 2024-10-11T20:33:50.577Z (almost 2 years ago)
- Topics: webidl
- Language: C#
- Size: 9.77 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebIDL parsing library in C#
Small library for parsing of WebIDL files and accessing their data from .NET application
```
using WebIdlCSharp;
var types = WebIdlParser.LoadTypesFromFile("vibration.json");
```
These JSON files could be generated using small NodeJS script from regular WebIDL files.
```
import webidl2 = require("webidl2");
import * as fs from "fs";
const content = fs.readFileSync(fileName);
const parsingStructure = webidl2.parse(content.toString());
fs.writeFileSync(outputFileName, JSON.stringify(parsingStructure, null, 2));
```