You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "pnoltes (via GitHub)" <gi...@apache.org> on 2023/10/24 10:55:43 UTC
[I] Type aware properties improvements (celix)
pnoltes opened a new issue, #674:
URL: https://github.com/apache/celix/issues/674
# Intro
Improve celix properties so that properties can be stored and loaded to/from file with type information and encode (serialize) to/from netstring with type information.
# Store / Load
Ensure that properties stored using `celix_properties_store` contain type information if the entry is not a string (i.e. long, double, boolean or version) and that properties loaded using `celix_properties_load`, `celix_properties_loadWithStream` or `celix_properties_loadFromString` used the optional type information to load a type aware properties set.
# Properties netstring encoding
Add some util functions that can encode/decode a celix properties set to/from a netstring sequence.
The properties can be a netstring sequence where the content is:
- a number of properties entries in the netstring sequence, where every entry has 3 netstring entries
- a string key
- a dfi descriptor type (`t` (string), `J` (long), `D` (double) or `Z` (boolean) `lcelix_version_t;` (celix version))
- a string representation of the value
# Array support
Currently properties do not support a array of typed entries.
Support for typed arrays for the following types (string, long, double, bool and celix_version_t) would be nice to have.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Type aware properties improvements (celix)
Posted by "pnoltes (via GitHub)" <gi...@apache.org>.
pnoltes commented on issue #674:
URL: https://github.com/apache/celix/issues/674#issuecomment-1962937220
In PR #727, element types for the array list were introduced.
To ensure the introduction of array list element types is backwards compatible, a potential element type value of `CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED` was added. The support for the `CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED` element type is intended to be temporary. This addition allows for a separate PR that focuses solely on refactoring Celix array list usage.
- [ ] Create a pull request to remove the `CELIX_ARRAY_LIST_ELEMENT_TYPE_UNDEFINED` array list element type and the `celix_arrayList_create` function. Additionally, refactor all instances where the undefined array list usage occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Type aware properties improvements (celix)
Posted by "PengZheng (via GitHub)" <gi...@apache.org>.
PengZheng commented on issue #674:
URL: https://github.com/apache/celix/issues/674#issuecomment-1777010033
It will be nice to have array support.
If we went one step further to support embedding properties, celix properties will become json.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org