Giter Club home page Giter Club logo

ps-jsonutils's People

Contributors

alexeyatigloo avatar rogin avatar szeraax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ps-jsonutils's Issues

Module is not at v1.0

@choovick, I've done a code review and feel like there aren't any issues that i would say prevent it from being ready for a v1.0 release, Are there any things that you'd recommend I look at or do before I mark this as v1 ready?

Does JSON array ordering count as changes?

At present, JsonUtils will count these two input objects as being different.

Get-JsonDifference '{"a":[1,2,3]}' '{"a":[1,3,2]}'

Is that what you'd expect? Or would you like to see it ignore array ordering?

Change PS Verb on ConvertTo-KeysSortedJSONString

This is only a minor pet-peeve, but generally, ConvertTo-* cmdlets serialize data from powershell objects into their noun specification. ConvertTo-Html, ConvertTo-Csv, etc. Similar for ConvertFrom-* cmdlets. I would suggest using a verb that represents changing data from 1 form to another, where neither is a native powershell object. Good list to be found on this MS page. I personally like Convert:

Changes the data from one representation to another

An example: Convert-Path changes a path from a string to a string. Very similar to this function.

A possible name then could be Convert-JsonToSortedKeys or something.

You'd want to use the alias parameter decorator to not break existing functions that rely on this name. You may want to add a warning notice when people do use the old cmdlet name though. Definitely wouldn't want to remove the alias prior to v1.0.0, but you may possibly want to never remove that alias.

Happy to submit a PR if you're open to it.

Bug: data loss

> Get-JsonDifference -FromJsonString '{"hat": {"rabbit": "Fluffy"}}' `
>>                     -ToJsonString '{"hat": {"magic words to make the rabbit vanish": "abbacadabra"}}'
{
  "Added": {
    "hat": {
      "magic words to make the rabbit vanish": "abbacadabra"
    }
  },
  "Changed": {},
  "ChangedOriginals": {},
  "Removed": {},
  "NotChanged": {},
  "New": {
    "hat": {
      "magic words to make the rabbit vanish": "abbacadabra"
    }
  }
}

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.