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

Rewrite the JSON Configuration store support #49

Open
zapodot opened this issue Feb 12, 2015 · 0 comments
Open

Rewrite the JSON Configuration store support #49

zapodot opened this issue Feb 12, 2015 · 0 comments

Comments

@zapodot
Copy link
Member

zapodot commented Feb 12, 2015

The current JSON configuration store support is really quite limited and does not support tagging or hierarchical JSON documents really well..

It should really be rewritten to support JSON documents such as:

{
   "key": "default value",
   "@testing.key": "value used for \"testing\"",
   "sub": {
      "anotherKey": "anotherValue"
     }
}

Ideally it should resolve like this:

final ConstrettoConfiguration conf = ...
if(conf.getCurrentTags().contains("testing")) {
    System.out.println(conf.evaluteToString("key")); // prints "value used for "testing" 
} else {
    System.out.println(conf.evaluteToString("key")); // prints "default value" 
} 
System.out.println(conf.evaluteToString("sub.anotherKey")); // prints "anotherValue" 
@zapodot zapodot added this to the Constretto 3.0 milestone Feb 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant