JSefa is a simple library for stream-based serialization of java objects to XML, CSV, or FLR and back again using an iterator-style interface independent of the serialization format. There is a standard and an android edition available.
License
Apache License V2.0Follow JSefa
You Might Also Like
Our Free Plans just got better! | Auth0 by Okta
You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Rate This Project
Login To Rate This Project
User Reviews
-
Jsefa is not bad, but they some bug, 0.9.3 or 1.0.0, you need to fixe it, not perfect 1) you cant add several constraints on cvsfield/flrfield with a validator, you can set only one constraint because you get an error on annotation, feature say we can but in reality it is not possible constraint="maxLength=15" that run, constraint="minLength=5', "maxLength=15"doesnt run and give error 2) When you make validator for your application, you need add jsefa class for get accessor in the package of your validator, or you cant access because not visible. This one : class ConstraintsAccessor { is only visible from current package, we must copy it in package of application validator. 3) you can use for serialization/deserialization a prefix cascade object like object Departement with prefix DEP with subrecord Employee with prefix EMP, The big problem, you must set the same size prefix, if we dont do we get an exception length prefix error, not funny, when you write several blocs record with different structure, it is logic to have a prefix of different size. in case, this mecanizem is totaly useless because we must manage with loop and close/open with several serializer for write several blocs with different size prefix and it is not possible to set padding.. HEADER:.......... CUSTOMER:........ CUSTOMER:........ CUSTOMER:........ CONTRACTORS:.... CONTRACTORS:.... SUBSDIARIES:........... SUBSDIARIES:........... SUBSDIARIES:........... SUBSDIARIES:........... SUBSDIARIES:........... SUBSDIARIES:........... FOOTER ...
-
I am using JSEFA in 2 different projects, where we have to create textual export files. The implementation is really stable and comfortable. Simply annotate what you need, and there you go. I am using FLR and CSV Variants - never tried XML, yet. For FLR i am using compositions of a base class with head-data and specialized classes which extend the base-class for specific data. This works pretty good. I use gaps in the annotation pos = x where i use x in *10 Steps. So I start with pos = 10, pos = 20 and so on. For later inserts of new Data between 2 i take 5 and so on... so this makes it easy to extend the data-lines. Thanks for this piece of code :)