Comments (3)
Given the CBOR object {"isFoo": true}
, rename the property public bool IsFoo { get; set; }
to public bool IsIsFoo { get; set; }
.
Also, to learn more about how the library maps property names to key names, see UseCamelCase in the documentation.
from cbor.
If "useCamelCase" is true :
In the .NET version, for each eligible property or field name, the word "Is" is removed from the name
if the name starts with that word, then the name is converted to camel case,
What is the reason behind it?
from cbor.
The intent was to mimic, to some extent, the behavior in the Java version of the library (which uses a better established convention involving get
, set
, and is
methods; see Corda, for example).
But as I've just found out, neither System.Text.Json
nor Json.NET appear to treat property names starting with "Is" specially, compared to other property names. But my CBOR library does, hence the suggestion in my previous comment.
from cbor.
Related Issues (20)
- Unable to encode value as half-float HOT 1
- Expected double header, but found F9 HOT 1
- [Error] PeterO type or namespace could not be found. HOT 1
- CBOR NumberConverstion=Double Issue HOT 3
- Object serialization/deserialization and using integers as map keys HOT 4
- AsString throws System.InvalidOperationException: Not a text string type HOT 4
- CBOR Byte String Support HOT 2
- CBORObject.ToObject when destination type contains IReadOnlyXxxx properties HOT 4
- Efficient way to pass in immutable/non-array collections HOT 2
- Different output from VS2022 HOT 1
- Typed CBORObject.FromInt etc. HOT 4
- Premature end of data HOT 1
- support/interop with System.Formats.Cbor HOT 4
- Example "custom strategy for converting objects" contains null in result object HOT 2
- Code style - reformat or add configuration file?
- Premature end of stream when reading from NetworkStream in .Net 6 on Linux HOT 8
- CBORObject.Read & ToObject, CBOR byte string (type 2) and target types HOT 2
- Add guidance for CBOR converter source generation
- Question: changed encoding of `0.0` between 4.5.2 and 4.5.3 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 cbor.