Comments (3)
Encoder from https://stackoverflow.com/a/47626762/3234468 helps in json load and then applying deep merge using benedict worked for me.
from python-benedict.
@divyanshu16 as you can see in the json serializer, all unexpected types are casted to str
to avoid encoding errors.
Does it work correctly if you encode it with the standard json
encoder?
json.loads(json.dumps({"x": [np.int64(0), np.int64(34)]})))
Keep in mind that with benedict
all encoders/decoders can receive their own options using kwargs, it means that you can write your own json encoder and pass it using the default
option to to_json
method.
from python-benedict.
any feedback?
from python-benedict.
Related Issues (20)
- Separate installation targets for certain dependencies HOT 6
- Key should not contain keypath separator ValueError - limits the supportable YAML HOT 3
- to_yaml raises FileNotFoundError if file is just the filename HOT 2
- Add possibility to read/write encrypted data.
- Add possibility to access items using keys as attributes (dotted notation).
- Protected keys in JSON items after calling json.dumps on benedict HOT 7
- Missing dependency on pyyaml HOT 3
- keyattr dynamic or AttributeError HOT 5
- INI support for case sensitive keys HOT 6
- `from_ini()` returns a `str` instead of a `dict` HOT 21
- Support defining how input data is loaded (filepath, url or data-string) HOT 3
- Assigning benedict element to itself clears the element HOT 2
- Minimalize dependencies and define scope HOT 1
- Move some requirements to a new `parse` extra requirement.
- Exception when comparing with Protocol classes HOT 7
- Yaml serializer produces inconsistent results HOT 5
- Add `from_html` method. HOT 2
- iterating benedict_dictionary.items(), value is not benedict_type HOT 2
- Union with assignment operator produces inconsistent results compared to `dict`. HOT 2
- README Index links don't work on PyPI, only GitHub's markdown renderer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-benedict.