8.8.1 • Published 1 year ago

x3dvalidate v8.8.1

Weekly downloads
-
License
BSD 2-Clause Lice...
Repository
github
Last release
1 year 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

1 year ago

8.8.0

1 year ago

8.7.1

1 year ago

8.7.0

1 year ago

8.6.0

2 years ago

8.5.2

2 years ago

8.5.1

2 years ago

8.5.0

2 years ago

8.4.0

2 years ago

8.3.0

2 years ago

8.2.0

2 years ago

8.1.1

2 years ago

8.1.0

2 years ago

8.0.0

2 years ago

7.5.0

2 years ago

7.3.0

2 years ago

7.2.1

2 years ago

7.2.0

2 years ago

7.0.1

2 years ago

7.0.0

2 years ago

6.0.0

2 years ago

5.0.0

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

4.1.3

2 years ago

4.0.2

2 years ago

4.0.0

2 years ago

3.5.0

2 years ago

3.4.0

2 years ago

3.3.3

2 years ago

3.3.2

2 years ago

3.3.1

2 years ago

3.0.5

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

2.0.25

2 years ago

2.0.8

2 years ago

2.0.6

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.1

2 years ago

1.0.7

2 years ago

2.0.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago