Skip to content

fxtack/projson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

projson

中文

This project uses ProjFS to map JSON to file tree.

introduce

Usage

Before running, please ensure that the optional Windows feature: ProjFS is enabled. To enable the ProjFS feature, you can use the following PowerShell command.

Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS -NoRestart

After enabling the ProjFS feature, use projson --help to view the usage information.

Usage: projson.exe --prj-path <Virtual root directory path> <--json-file <Json file path>|--json-text <Json text>>

Options:
  -f, --json-file <Json file path>              Specifies the JSON file to read
  -t, --json-text <Json text>                   Specifies the JSON text to read
  -p, --prj-path <Virtual root directory path>  Specifies the virtualization root directory path
  -h, --help                                    Print help
  -V, --version                                 Print version

When mapping JSON to files or directories, the JSON key will be the file or directory name, and the type of the value will determine whether the key-value pair is mapped to a file or a directory, according to the following rules:

  • Object: Directory, the object's sub key-values are directory items.
  • Array: Directory, the index value of the element in the array will be the file name. If the element type is Object or Array, it will be the directory, while others will be the file.
  • String: File, the file content is the string value.
  • Number: File, the file content is the numeric value.
  • Boolean: File, the file content is 'true' or 'false'.
  • Null: Empty file.

Example

Map JSON as a file tree from file.

projson.exe --json-file src.json --prj-path D:\dst

About

This program uses ProjFS to map json to file tree.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages