tejacques / polarize Goto Github PK
View Code? Open in Web Editor NEWA C# helper library for serializing only the specified fields of an object.
License: MIT License
A C# helper library for serializing only the specified fields of an object.
License: MIT License
This should be done by adding a JsonConstraint
object, and extending the JsonFilter object to have a Dictionary<string, JsonConstraint>
. The constraints should be checked for fields, and the object serialized should have the appropriate constraints applied.
This is due to the constraint handler in the writer not being ignored if the constraint was already handled in the converter.
We want to eventually support the following styles for field filtering:
{
fields: [
'a',
'b.x',
'b.y',
'c.{x,y}', // bash string explosion
'd.{x,y.{i,j,k}}', // nested braces
{ 'e' : ['x', 'y'] }, // json style
{
'f' : ['x', 'y'],
'g' : [
'x',
{ 'y' : ['i', 'j', 'k'] }
]
}, // nested json
'h[0]', // array notation
'i[0:10]', // python-style slice notation
'j[5:10].{x,y[0:2].{i,j,k[2:3]}}', // all together
'[0:50]', // no preceding field to denote top level array
],
constraints: {
'full.field.path' : {
'offset': 0,
'limit': 1
} // equivalent of '[offset:offset+limit]'
}
}
Simple fix -- the field path is always necessary to grab the constraints, but it is only grabbed if the jsonFieldsLen is nonzero. Change it so that it is always grabbed.
I think I may have just forgotten to add it.
The entire model / approach needs to be reworked here. The current state, and the state of the inner writer need to be tracked separately.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.