Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add json parser to build attribute in duktape #166

Merged
merged 2 commits into from
Nov 13, 2021
Merged

feat: add json parser to build attribute in duktape #166

merged 2 commits into from
Nov 13, 2021

Conversation

sheny1xuan
Copy link
Contributor

@sheny1xuan sheny1xuan commented Nov 12, 2021

Signed-off-by: stonex 1479765922@qq.com

Description

  • Link to this issue.
  • Add a json parser to build duktape object.
  • Test double, int, bool, string and object.

Signed-off-by: stonex <1479765922@qq.com>
@casbin-bot
Copy link
Member

@EmperorYP7 @divy9881 @noob20000405 please review

@hsluoyz
Copy link
Member

hsluoyz commented Nov 12, 2021

@xcaptain

Copy link
Member

@EmperorYP7 EmperorYP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Well done @sheny1xuan 🙌🏻 However, the variable naming should be consistent throughout the code. (pascalCase)

tests/model_enforcer_test.cpp Outdated Show resolved Hide resolved
tests/model_enforcer_test.cpp Outdated Show resolved Hide resolved
tests/model_enforcer_test.cpp Outdated Show resolved Hide resolved
tests/model_enforcer_test.cpp Outdated Show resolved Hide resolved
casbin/model/scope_config.cpp Outdated Show resolved Hide resolved
@EmperorYP7
Copy link
Member

EmperorYP7 commented Nov 13, 2021

I was wondering if we actually need the casbin::ABACData workflow now. Since the JSON parser can handle single depth attributes as well. What do you think @sheny1xuan @hsluoyz?

@hsluoyz
Copy link
Member

hsluoyz commented Nov 13, 2021

@EmperorYP7 then we can remove it I think

Signed-off-by: stonex <1479765922@qq.com>
@sheny1xuan
Copy link
Contributor Author

I think so, but I think we should make JSON parse comprehensive support the old work that casbin::ABACData do. Then we can remove it. @EmperorYP7

@hsluoyz
Copy link
Member

hsluoyz commented Nov 13, 2021

@sheny1xuan good point!

@hsluoyz hsluoyz merged commit 367254b into casbin:master Nov 13, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.41.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants