René's URL Explorer Experiment


Title: Evaluate also getter from classes · Issue #177 · JSONPath-Plus/JSONPath · GitHub

Open Graph Title: Evaluate also getter from classes · Issue #177 · JSONPath-Plus/JSONPath

X Title: Evaluate also getter from classes · Issue #177 · JSONPath-Plus/JSONPath

Description: Could be related to #174 Motivation Currently the getter from classes, that encapsulate fields, are not "visible" to the library, so it is not possible to get a value from getter property. Becase getter are "seen" from developer as reado...

Open Graph Description: Could be related to #174 Motivation Currently the getter from classes, that encapsulate fields, are not "visible" to the library, so it is not possible to get a value from getter property. Becase g...

X Description: Could be related to #174 Motivation Currently the getter from classes, that encapsulate fields, are not "visible" to the library, so it is not possible to get a value from getter property...

Opengraph URL: https://github.com/JSONPath-Plus/JSONPath/issues/177

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Evaluate also getter from classes","articleBody":"\u003c!--\r\nNOTE: THIS PROJECT IS NOT BEING ACTIVELY MAINTAINED.\r\n\r\nYou can file a suggestion in case someone decides to work on it.\r\n\r\nHowever, any proposed syntax changes will most likely be required to\r\nfirst go through standardization for consistency with other jsonpath\r\nimplementatioins.\r\n\r\nSee https://github.com/JSONPath-Plus/JSONPath/issues/124 .\r\n--\u003e\r\n\r\nCould be related to https://github.com/JSONPath-Plus/JSONPath/issues/174\r\n\r\n## Motivation\r\n\r\n\u003c!-- What would be the purpose of this new feature? --\u003e\r\n\r\nCurrently the `getter` from classes, that encapsulate fields, are not \"visible\" to the library, so it is not possible to get a value from getter property. Becase getter are \"seen\" from developer as readonly fields, the library should at least also be able to \"read\" them.\r\n\r\n## Current behavior\r\n\r\n\u003c!-- If this is to enhance an existing rule, how does the rule\r\n   currently behave in regard to the new changes? --\u003e\r\n\r\ngetter are ignored\r\n\r\n## Desired behavior\r\n\r\n\u003c!-- What would you like to see happen instead? --\u003e\r\n\r\nThe getters should be evaluated exactly the same as pure fields in classes.\r\n\r\n## Code example\r\n\r\n```js\r\nimport { JSONPath } from 'jsonpath-plus';\r\n\r\nclass TestData {\r\n  #value;\r\n  \r\n  constructor(value) {\r\n    this.#value = value;\r\n  }\r\n\r\n  get value() {\r\n    return this.#value;\r\n  }\r\n\r\n  toJSON() {\r\n    return { jsonValue: this.value };\r\n  }\r\n\r\n  someValue = 33;\r\n}\r\n\r\nconst data = new TestData(11);\r\nconsole.log(data); // TestData {someValue: 33}\r\nconsole.log(data.value); // 11\r\nconsole.log(data['value']); // 11\r\nconsole.log(JSON.stringify(data)); // {\"jsonValue\":11}\r\n\r\nconst val = JSONPath({ path: '$.value', json: data });\r\nconst val1 = JSONPath({ path: '$.jsonValue', json: data });\r\nconst val2 = JSONPath({ path: '$.#value', json: data });\r\nconst val3 = JSONPath({ path: '$.someValue', json: data });\r\n\r\nconsole.log(val); // [] - expected [11]\r\nconsole.log(val1); // []\r\nconsole.log(val2); // []\r\nconsole.log(val3); // [33]\r\n\r\nconsole.log(Object.prototype.hasOwnProperty.call(data, 'value')); // false\r\nconsole.log('value' in data); // true\r\n```\r\n","author":{"url":"https://github.com/WebDucer","@type":"Person","name":"WebDucer"},"datePublished":"2022-08-19T14:15:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/177/JSONPath/issues/177"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eb9361f2-dd87-e0d3-4a0c-41235742df7a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE9C8:3BB1CB:107E7D9:1743E3F:696F55AF
html-safe-nonce1656449fe8e0c1c1871c95849ec60421aa6df7a031b40bde3fad512d6a5d420b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOUM4OjNCQjFDQjoxMDdFN0Q5OjE3NDNFM0Y6Njk2RjU1QUYiLCJ2aXNpdG9yX2lkIjoiNjk3NjcwNjM5NzgwNzE0NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac86e5943d016ef1f6f27db9c078d804b28b4760635a87c4ab12a41f6a12eb3411
hovercard-subject-tagissue:1344503802
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONPath-Plus/JSONPath/177/issue_layout
twitter:imagehttps://opengraph.githubassets.com/96483ebd895c4c276dc86bf28da031aba87d2eb7fe5864d48a5c54de2c4b8d16/JSONPath-Plus/JSONPath/issues/177
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/96483ebd895c4c276dc86bf28da031aba87d2eb7fe5864d48a5c54de2c4b8d16/JSONPath-Plus/JSONPath/issues/177
og:image:altCould be related to #174 Motivation Currently the getter from classes, that encapsulate fields, are not "visible" to the library, so it is not possible to get a value from getter property. Becase g...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameWebDucer
hostnamegithub.com
expected-hostnamegithub.com
None49bb2ee76ae1b4ec758faefafda636ff20b05a9708bb290d28422cdf542ae979
turbo-cache-controlno-preview
go-importgithub.com/JSONPath-Plus/JSONPath git https://github.com/JSONPath-Plus/JSONPath.git
octolytics-dimension-user_id67874603
octolytics-dimension-user_loginJSONPath-Plus
octolytics-dimension-repository_id1716525
octolytics-dimension-repository_nwoJSONPath-Plus/JSONPath
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1716525
octolytics-dimension-repository_network_root_nwoJSONPath-Plus/JSONPath
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release036f37fe552777ac9c6ee661957f947285aab936
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONPath-Plus%2FJSONPath%2Fissues%2F177
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONPath-Plus%2FJSONPath%2Fissues%2F177
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONPath-Plus%2FJSONPath
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177
Reloadhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177
JSONPath-Plus https://patch-diff.githubusercontent.com/JSONPath-Plus
JSONPathhttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Please reload this pagehttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Fork 198 https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Star 1.1k https://patch-diff.githubusercontent.com/login?return_to=%2FJSONPath-Plus%2FJSONPath
Code https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Issues 49 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues
Pull requests 5 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulls
Actions https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/actions
Projects 0 https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/projects
Wiki https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/security
Please reload this pagehttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177
Insights https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulse
Code https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath
Issues https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues
Pull requests https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulls
Actions https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/actions
Projects https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/projects
Wiki https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/wiki
Security https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/security
Insights https://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JSONPath-Plus/JSONPath/issues/177
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/JSONPath-Plus/JSONPath/issues/177
Evaluate also getter from classeshttps://patch-diff.githubusercontent.com/JSONPath-Plus/JSONPath/issues/177#top
Featurehttps://github.com/JSONPath-Plus/JSONPath/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com/WebDucer
https://github.com/WebDucer
WebDucerhttps://github.com/WebDucer
on Aug 19, 2022https://github.com/JSONPath-Plus/JSONPath/issues/177#issue-1344503802
#174https://github.com/JSONPath-Plus/JSONPath/issues/174
Featurehttps://github.com/JSONPath-Plus/JSONPath/issues?q=state%3Aopen%20label%3A%22Feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.