stoplightio / json Goto Github PK
View Code? Open in Web Editor NEWUseful functions when working with JSON.
License: Apache License 2.0
Useful functions when working with JSON.
License: Apache License 2.0
As a developer, I can get the outer Location for a JsonPath, so that I can copy to clipboard, delete it or insert as a sibling.
getLocationForJsonPath
gives the inner boundaries of a JsonPath so is great to update json content, but not so much for deleting o inserting into a json file (without editing unnecesary portions of text).
Calculate the outter location in the yml version of this library is somehow easy but not in the json version.
Maybe a new function getOuterLocationForJsonPath
Add any other context or screenshots about the feature request here.
master
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
The npm token configured in the NPM_TOKEN
environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/
.
If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.
Please make sure to set the NPM_TOKEN
environment variable in your CI with the exact value of the npm token.
Good luck with your project β¨
Your semantic-release bot π¦π
Just putting the demo code after adding the dependency in package.json, result.pointers is undefined.
import { parseWithPointers, safeParse, safeStringify } from "@stoplight/json";
const result = parseWithPointers(`{
"hello": "world",
"address": {
"street": 123
}
}`);
console.log(result.data);
console.log(result.pointers);
(node:44456) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
{ hello: 'world', address: { street: 123 } }
undefined
It gives undefined
It should have a source map with multiple paths
node ./sample.mjs
{ //... other settings
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.0",
"@openapi-contrib/json-schema-to-openapi-schema": "^2.2.4",
"@openapitools/openapi-generator-cli": "^2.5.2",
"@stoplight/json": "^3.20.1",
"@stoplight/json-schema-merge-allof": "^0.7.8",
"@stoplight/json-schema-ref-parser": "^9.2.2",
"fs-extra": "^11.1.0",
"json-schema-merge-allof": "^0.8.1",
"json-schema-to-jsdoc": "^1.1.0",
"node-glob": "^1.2.0",
"openapi-types": "^12.1.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/node": "^18.11.18"
}
}
https://github.com/stoplightio/platform/blob/develop/platform/src/utils/general/index.js
These are helpful generic functions that we should cleanup and preserve.
Perhaps re-think names along the way.
Create tests if not already there.
Add brief description to readme and in comment at top of each function.
pruneObject: https://github.com/stoplightio/platform/blob/develop/platform/src/utils/general/index.js#L99
sortObjectKeys: https://github.com/stoplightio/platform/blob/develop/platform/src/utils/general/index.js#L124
renameObjectKey: https://github.com/stoplightio/platform/blob/develop/platform/src/utils/general/index.js#L146
omitByRecursively: https://github.com/stoplightio/platform/blob/develop/platform/src/utils/general/index.js#L174
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.