-
Notifications
You must be signed in to change notification settings - Fork 31
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
should allow config override the object within an array #239
Comments
This was referenced Feb 7, 2017
hoatle
added a commit
to hoatle/teracy-dev
that referenced
this issue
Feb 7, 2017
hoatle
added a commit
to hoatle/teracy-dev
that referenced
this issue
Feb 8, 2017
…ray: implementation
hoatle
added a commit
to hoatle/teracy-dev
that referenced
this issue
Feb 8, 2017
…ray: bug fix for the array of string
hoatle
added a commit
that referenced
this issue
Feb 9, 2017
hoatle
added a commit
that referenced
this issue
Feb 9, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example default config:
"_id" is required for every object within the array.
By introducing "_id" and "_op" meta key, we can override the configuration by its "_id" with its "_op" option ("a" - append, "o" - override, "r" - replace, "d" - delete).
_id exist => _op="o" by default. _op could be one of [o, r, d]
_id does not exist => _op="a" by default and only this value can be used.
_op="a": adding to the end of the array by default. To specify the index to append after, use "_idx" key with the right index (see Array.insert(index, value) Ruby API to use the right index value)
We also support force override the array key with: "r" ("r" - replace) to completely replace the array key, this is useful when we want to replace the array completely
for example:
This will replace default "synced_folders" with an empty array "[]".
"_" is reserved for teracy-dev to override the default config.
This is applied for objects within array only, for JSON object, just use its key to override.
The text was updated successfully, but these errors were encountered: