Giter Site home page Giter Site logo

eliteloser / convertto-json Goto Github PK

View Code? Open in Web Editor NEW
21.0 4.0 5.0 115 KB

Svendsen Tech's ConvertTo-STJson is a pure-PowerShell ConvertTo-Json for PowerShell version 2

Home Page: https://www.powershelladmin.com/wiki/ConvertTo-Json_for_PowerShell_version_2

License: MIT License

PowerShell 100.00%
powershell json json-api powershell-script powershell-module splunk splunk-http convertto-json convertto-stjson svendsentech

convertto-json's Issues

Nested arrays have alignment issues with opening and closing brackets

Nested arrays have alignment issues with opening and closing brackets.

Example to reproduce:

. .\ConvertTo-STJson.ps1; ConvertTo-STJson -InputObject @{
            a = @(1..3), 'a', 'b'
            nested = @{
                NestedMore = @(1, @{
                    foo = @{ key = 'bar'; a = "b" }
                }, @(1,2,3, @(4,5,6)))
                c = 'd'
            }
        }

Misaligned opening and closing brackets with several levels of nesting. Syntactically correct, though.

Add a parameter for custom date formatting strings

Add a parameter for custom date formatting strings, as supported by the ToString() method called on DateTime object types. I should have done this in the first place and just defaulted to ISO8601 seen in retrospect.

Now I'm stuck with the -DateTimeAsISO8601 parameter, so I will add a new one, maybe with the name -DateTimeFormatString - and make it so you can't specify both of these at the same time, either with parameter sets or just conditional if/else statements, likely the latter.

Hello, I have some question :)

Can I merge your code into my future repository?

I create an information collector with PowerShell, and I use your ps1 to solved the [Convertto-json] function not found in Powershell 2.0 issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.