{"id":36586899,"url":"https://github.com/developframework/expression","last_synced_at":"2026-01-12T08:04:15.168Z","repository":{"id":57719711,"uuid":"90447522","full_name":"developframework/expression","owner":"developframework","description":"Easy to get value from Object, Array or Map.","archived":false,"fork":false,"pushed_at":"2022-10-09T07:12:05.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-26T21:57:04.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-06T08:06:45.000Z","updated_at":"2022-07-22T09:46:24.000Z","dependencies_parsed_at":"2022-09-13T13:01:55.888Z","dependency_job_id":null,"html_url":"https://github.com/developframework/expression","commit_stats":null,"previous_names":[],"tags_count":14,"template":null,"template_full_name":null,"purl":"pkg:github/developframework/expression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developframework%2Fexpression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developframework%2Fexpression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developframework%2Fexpression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developframework%2Fexpression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developframework","download_url":"https://codeload.github.com/developframework/expression/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developframework%2Fexpression/sbom","scorecard":{"id":337181,"data":{"date":"2025-08-11","repo":{"name":"github.com/developframework/expression","commit":"cf683e85fb3175dc316c144c5f51bcff7ee8324b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T04:58:48.449Z","repository_id":57719711,"created_at":"2025-08-18T04:58:48.449Z","updated_at":"2025-08-18T04:58:48.449Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T08:04:13.348Z","updated_at":"2026-01-12T08:04:15.163Z","avatar_url":"https://github.com/developframework.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Expression说明文档\r\n\r\n## 1. 概述\r\n\r\n用于方便的从对象、数组、Map等结构中获取值\r\n\r\n### 1.1. 引用\r\n\r\n```xml\r\n\u003cdependency\u003e\r\n\t\u003cgroupId\u003ecom.github.developframework\u003c/groupId\u003e\r\n\t\u003cartifactId\u003eexpression\u003c/artifactId\u003e\r\n\t\u003cversion\u003e${version.expression}\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n### 1.2. 依赖项\r\n\r\n- commons-lang3.jar\r\n- lombok.jar\r\n\r\n## 2. 简单示例\r\n\r\n### 2.1. 表达式对象\r\n```java\r\nExpression expression = Expression.parse(\"user.name\");\r\n```\r\n\r\n把字符串`user.name` 解析成一个表达式对象。\r\n\r\n可以解析的表达式字符串有：\r\n\r\n| 表达式字符串     | 描述                                                         |\r\n| ---------------- | ------------------------------------------------------------ |\r\n| `user.name`      | 从根对象（根对象是对象或Map）取得user实例的name属性          |\r\n| `users[0].name`  | 从根对象（根对象是对象或Map）取得users数组实例的第1个元素的name属性 |\r\n| `[0].name`       | 从根对象（根对象是数组）取得第1个元素的name属性              |\r\n| `user.say(name)` | 从根对象（根对象是对象或Map）调用user实例的say方法，并入参name |\r\n| `array[0][0]`    | 支持多维数组 @since 1.6.0                                    |\r\n\r\n### 2.2. 取值\r\n\r\n例如有如下结构的User实体类：\r\n\r\n```java\r\n@Data\r\npublic class User {\r\n\r\n    private String name;\r\n\r\n    private String[] emails;\r\n\r\n    public User(String name, String[] emails) {\r\n        this.name = name;\r\n        this.emails = emails;\r\n    }\r\n}\r\n```\r\n\r\n有如下的数据结构关系：\r\n\r\n```java\r\nUser peter = new User(\"Peter\", new String[]{\"peter@163.com\", \"peter@qq.com\"});\r\nUser tom = new User(\"Tom\", new String[]{\"tom@163.com\", \"tom@qq.com\"});\r\nUser[] users = new User[]{peter, tom};\r\nMap\u003cString, Object\u003e map = new HashMap\u003c\u003e();\r\nmap.put(\"users\", users);\r\n```\r\n\r\n说明：peter,tom两个User对象存放于users数组对象中，而users数组对象存放于map中，键值为\"users\"。\r\n\r\n那么假如要从map中取得peter的第二个email值。普通java代码如下：\r\n\r\n```java\r\nString peterSecondEmail = ((User[])map.get(\"users\"))[0].getMails()[1];\r\n```\r\n\r\n列为表达式：`users[0].emails[1]`\r\n\r\n```java\r\nString expressionValue = \"users[0].emails[1]\";\r\nString peterSecondEmail = ExpressionUtils.getValue(map, expressionValue, String.class);\r\nSystem.out.println(peterSecondEmail);\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopframework%2Fexpression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopframework%2Fexpression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopframework%2Fexpression/lists"}