Git Product home page Git Product logo

vscode-copy-json-path's People

Contributors

amoshydra avatar dependabot[bot] avatar enviable avatar nidu avatar olivier-deschenes avatar

Stargazers

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

Watchers

 avatar  avatar

vscode-copy-json-path's Issues

Copy path in JS object (.js) doesn't work

What's happening

No context option (on right click), in .js files and js code.

Some examples I tried:

const person = {
  name: "Alice",
  age: 20,
};
console.log({
  name: "Alice",
  age: 20,
});

Add Python Support

In Python, everything is accessed via subscripts, no dot notation. Please add a configuration option to make it so all object paths use subscripting. Thank you

Setting to change delimiter from `.` to any character

This extension has been a godsend for copying JSON paths from translations files for i18n, however in our project's configuration, we use colons : to delimit between path elements instead of . by default.

It would be amazing if this were configurable to accept any character rather that period .

Make JSONtoPath a npm lib

I've been trying to figure out a good way to get the JSON path from the cursor position and this does it really well.
I was hoping if this was made into an npm package then I'd be able to use it.
I'm open to helping set it up if that's a concern.

Couldn't copy path.

Whenever I right click and try to copy the path it says Couldn't copy path.

Unfortunately the error is not more verbose than that. How can I go about debugging this?

Add option to copy as non-escaped string path

I mainly use this extension for copying JSON dot-notation paths from locale json file to JS - usually these are used inside a string in a function, a-la:

// JSON
"globals": {
    "ok-label": "OK",
    "cancel": "Cancel"
}

// Usage:
t('globals.ok-label', 'OK')

Currently, the extension copies paths with invalid chars (specifically - in my case) and wraps these segments in [" and "] (e.g. copying "ok-label" from the above JSON would copy globals["ok-label"].

It would be really cool to have some option to change this so the escaping isn't done automatically - I would like to copy globals.ok-label instead.

Thanks for a great extension!

How to configure to use quotes

Hi thanks for the extension. I couldn't make it work for the quotes. What should I write in Copy JSON Path: Non Quoted Key Regex field to use quotes?

I want this
json_data["entry"][0]["changes"][0]["value"]

Instead of this
json_data.entry[0].changes[0].value

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.