8.8.1 • Published 12 days ago

x3dvalidate v8.8.1

Weekly downloads
-
License
BSD 2-Clause Lice...
Repository
github
Last release
12 days ago

x3dvalidate

Validate JSON files (.x3dj or .json) against X3D JSON schema version 4.0 with Ajv

Node.js is a requirement: Download from https://nodejs.org/

First install node.js and git. Download and install node.js from https://nodejs.org/. Download and install git is available at https://git-scm.com/

git clone https://github.com/coderextreme/x3dvalidate
cd x3dvalidate
npm install -g x3dvalidate
node x3dvalidate.js examples/*.json    # use your own .x3dj or .json files (any extension works)
node test/app.js # simple test app

x3dvalidate is a full npx program (an npm module), thus you can run:

npx x3dvalidate file1.json file2.json ...
# NOTE:  I've had good luck specifying the full path to the JSON file(s)

For folders, I recommend using find and xargs on Linux/MacOS/Git for Windows/Git Bash/WSL

Example:

find ./examples -type f -name "*.json" -print0 | xargs -0 npx x3dvalidate

On Windows 10 (11?),

On windows PowerShell, you will need to set your Execution-Policy. Research PowerShell execution policies for the best policies. The first command below lists your policies and scope. . You will get a message with the website to go to if the powershell scripts fail. I recommend setting the policies back to the previous level when complete. Get old policy and scope from output of first command

PS C:\Users\yottzumm\x3dvalidate> Get-ExecutionPolicy -List
PS C:\Users\yottzumm\x3dvalidate> Set-ExecutionPolicy <policy> -Scope CurrentUser
PS C:\Users\yottzumm\x3dvalidate> .\bin\x3dvalidate.ps1 examples\abox.json .\examples\ball.json
PS C:\Users\yottzumm\x3dvalidate> Set-ExecutionPolicy <old policy> -Scope CurrentUser
PS C:\Users\yottzumm\x3dvalidate> Get-ExecutionPolicy -List

On the whole, it might be easier to run the Command Prompt.

C:\Users\yottzumm\x3dvalidate>bin\x3dvalidate.cmd examples\abox.json examples\ball.json

===================================================================================================================== For MacOS, install node.js, homebrew and git. Before running the commands above in Terminal, download an install homebrew from https://brew.sh/, and then invoke:

$ brew install git

in Terminal. Or git should be available in developer command tools from Apple. I was able to run node.js after installign the MacOS package from https://nodejs.org. Homebrew requires your password to install.

8.8.1

12 days ago

8.8.0

1 month ago

8.7.1

1 month ago

8.7.0

2 months ago

8.6.0

8 months ago

8.5.2

8 months ago

8.5.1

8 months ago

8.5.0

8 months ago

8.4.0

8 months ago

8.3.0

8 months ago

8.2.0

8 months ago

8.1.1

8 months ago

8.1.0

8 months ago

8.0.0

8 months ago

7.5.0

8 months ago

7.3.0

8 months ago

7.2.1

8 months ago

7.2.0

8 months ago

7.0.1

10 months ago

7.0.0

10 months ago

6.0.0

10 months ago

5.0.0

10 months ago

4.3.0

10 months ago

4.2.0

10 months ago

4.1.3

10 months ago

4.0.2

10 months ago

4.0.0

10 months ago

3.5.0

10 months ago

3.4.0

10 months ago

3.3.3

10 months ago

3.3.2

10 months ago

3.3.1

10 months ago

3.0.5

10 months ago

3.0.2

10 months ago

3.0.1

10 months ago

2.0.25

10 months ago

2.0.8

10 months ago

2.0.6

10 months ago

2.0.4

10 months ago

2.0.3

10 months ago

2.0.1

10 months ago

1.0.7

10 months ago

2.0.0

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago