JsonToPowershellClass.dll-Help.xml

<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml">
    <command:command
      xmlns:maml="http://schemas.microsoft.com/maml/2004/10"
      xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10"
      xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"
      xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
        <command:details>
            <command:name>Convert-JsonToPowershellClass</command:name>
            <command:verb>Convert</command:verb>
            <command:noun>JsonToPowershellClass</command:noun>
            <command:alias></command:alias>
            <maml:description>
                <maml:para>
                    Convert JSON to Powershell classes
                </maml:para>
                <maml:para>
                    Also available as an online tool - https://json2ps.app
                </maml:para>
            </maml:description>
        </command:details>
        <maml:description>
            <maml:para>
                Convert JSON to Powershell classes.
            </maml:para>
            <maml:para>
                JSON can be supplied as a string, a file that will be read or a URL that will be downloaded.
            </maml:para>
            <maml:para>
                Optionally create functions showing example usage.
            </maml:para>
            <maml:para>
                Optionally write an output file.
            </maml:para>
            <maml:para>
                Optionally copy the output to clipboard.
            </maml:para>
            <maml:para>
                Github: <maml:linkText>https://github.com/trossr32/ps-json-to-powershell-class</maml:linkText>
            </maml:para>
        </maml:description>
        <command:parameters>
            <command:parameter required="false" pipelineInput="true" variableLength="true" position="0">
                <maml:name>Json</maml:name>
                <maml:description>
                    <maml:para>
                        JSON string
                    </maml:para>
                </maml:description>
                <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
                <dev:type>String</dev:type>
                <dev:defaultvalue>null</dev:defaultvalue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="true" position="1">
                <maml:name>JsonFile</maml:name>
                <maml:description>
                    <maml:para>
                        JSON file name relative to current location, or relative path and JSON file name, or full path of JSON file
                    </maml:para>
                </maml:description>
                <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
                <dev:type>String</dev:type>
                <dev:defaultvalue>null</dev:defaultvalue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="true" position="2">
                <maml:name>Url</maml:name>
                <maml:description>
                    <maml:para>
                        URL to download JSON from
                    </maml:para>
                </maml:description>
                <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
                <dev:type>String</dev:type>
                <dev:defaultvalue>null</dev:defaultvalue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="true" position="3">
                <maml:name>RootObjectClassName</maml:name>
                <maml:description>
                    <maml:para>
                        The root object class name. If not supplied this will default to 'RootObject'
                    </maml:para>
                </maml:description>
                <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
                <dev:type>String</dev:type>
                <dev:defaultvalue>RootObject</dev:defaultvalue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="true" position="4">
                <maml:name>OutputFile</maml:name>
                <maml:description>
                    <maml:para>
                        If supplied, the result will be written to this output file. The function expects a *.ps1 file, so if a
                        path is supplied that doesn't end with '.ps1' then '.ps1' will be appended to the end of the parameter.
                    </maml:para>
                </maml:description>
                <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
                <dev:type>String</dev:type>
                <dev:defaultvalue>null</dev:defaultvalue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="false">
                <maml:name>CopyToClipboard</maml:name>
                <maml:description>
                    <maml:para>
                        If supplied the data uri will be saved to the clipboard.
                    </maml:para>
                </maml:description>
                <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
                <dev:type>SwitchParameter</dev:type>
                <dev:defaultValue>None</dev:defaultValue>
            </command:parameter>
            <command:parameter required="false" pipelineInput="false" variableLength="false">
                <maml:name>IncludeExamples</maml:name>
                <maml:description>
                    <maml:para>
                        If supplied the output classes will have example functions showing usages appended to the bottom
                    </maml:para>
                </maml:description>
                <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
                <dev:type>SwitchParameter</dev:type>
                <dev:defaultValue>None</dev:defaultValue>
            </command:parameter>
        </command:parameters>
        <command:examples>
            <command:example>
                <maml:title>Example 1: Convert a JSON file to Powershell classes including usage examples and copy the output to clipboard.</maml:title>
                <maml:Introduction>
                    <maml:paragraph>C:\PS></maml:paragraph>
                </maml:Introduction>
                <dev:code>Convert-JsonToPowershellClass -JsonFile 'C:\Temp\a-json-file.json' -CopyToClipboard -IncludeExamples</dev:code>
            </command:example>
        </command:examples>
        <maml:relatedLinks>
            <maml:navigationLink>
                <maml:linkText>https://github.com/trossr32/ps-json-to-powershell-class</maml:linkText>
            </maml:navigationLink>
        </maml:relatedLinks>
    </command:command>
</helpItems>