Comments (7)
From [email protected] on February 16, 2011 22:32:43
I don't believe guessing at the type based on the content is a good idea in general. It is less important for YamlBeans, where typically YAML is deserialized to objects, where the class definition is used for the schema.
Primitive type wrappers are expressed as null by a YAML field with an empty value. There is currently no way to express a null for other references. I will open a new issue as a task to add support for a !null tag.
Slightly more info in this thread:
http://groups.google.com/group/yamlbeans-users/browse_thread/thread/19dba370af58b9fd/2111f1ad42b77382
Status: WontFix
from yamlbeans.
From [email protected] on February 17, 2011 01:53:58
It is not guessing it is defining. When you wish '1' to be a String instead of an integer you say !!str "1".
It is an indication that YamlBeans does not cover complete YAML 1.1 specification.
from yamlbeans.
From [email protected] on February 17, 2011 02:04:25
YamlBeans' goal is to go from Java objects to YAML and vice versa using the minimal YAML markup. Type definitions come from the Java class definition, not from the YAML markup. Even if it did not conflict with YamlBeans' goals, implicit typing is a bad idea. This could be why it appears to be removed from the YAML 1.2 specification.
from yamlbeans.
From [email protected] on February 17, 2011 04:05:32
It stays in YAML 1.2 ! But fortunately, it was dramatically reduced.
Can you please provide a link which shows it was removed ?
This the specification for an integer: http://www.yaml.org/spec/1.2/spec.html#id2803828
Please read: "... matching the regular expression 0 | -? [1-9] [0-9]*"
Does it mean that YamlBeans does not have plans to support complete 1.2 in the future ?
from yamlbeans.
From [email protected] on February 17, 2011 04:26:58
At the top of the 1.2 spec it says, "We have removed unique implicit typing rules and have updated these rules to align them with JSON's productions."
You linked to section "10. Recommended Schemas". Again, YamlBeans uses the Java class definition as the schema. YamlBeans has no need for guessing at types using regex or verbose type tags. Again, YamlBeans is for Java to YAML to Java with minimal YAML markup. It is not for cross-platform data exchange. I do not care if YamlBeans does not implement optional portions of the spec. In fact, the specs' complexity is the reason that YAML will never see widespread adoption. Writing a parser is simply too hard.
You are the SnakeYAML author. You are not a user of YamlBeans. If you were, you'd be pleased that YamlBeans does what it intends to do (do I really need to repeat it again?) with an elegant API, tailored specifically for that purpose. If you need features beyond what YamlBeans was intended for, then I suggest using a different library, where you will pay the cost of a more complex API and uglier YAML markup.
from yamlbeans.
From [email protected] on February 17, 2011 05:46:32
At the top of the 1.2 spec it says, "We have removed UNIQUE implicit typing rules and have updated these rules to align them with JSON's productions.". It used to have 18 (!) values boolean but it is only 2 in 1.2. This is better.
If you somehow indicate that YamlBeans does not implement the complete 1.1 and is not going to support complete 1.2 then it would not confuse users. If you clearly state which parts of the specification are not implemented and why then users would try to avoid using optional features especially when they have to use a few parsers. Why not to mention it in your documentation ?
At the moment I am busy preparing the document with SnakeYAML/YamlBeans comparison. I would like to collect precise information about both. I do not know how to build YamlBean. How do you build it ? I do not know how to create a coverage report. Are you interested in creating together an unbiased comparison table ?
from yamlbeans.
From [email protected] on February 17, 2011 15:12:37
YamlBeans users don't try to use optional features. They have no need to. You are trying use cases that are atypical for YamlBeans users.
YamlBeans is a source directory containing Java files. You can compile it with Maven, Ant, Scar, Netbeans, Eclipse, javac, etc. There is nothing special about compiling it. You can also use the provided JAR.
My issue with your comparison page in the past is that you use it to sell your library while spreading FUD about other libraries. Potential users should choose a library on their actual merits. We have all worked hard on our libraries and it isn't right for them to be misrepresented. This can occur even when the facts are correct. It would be easy to make it appear that one library is better than others by using careful comparison tables and commentary. Having spoken with you publicly and privately over the past almost 3 years, I don't know you are capable of an unbiased comparison. Working together with you has failed in the past and I see no reason why this would be different.
YamlBeans excels at serializing Java objects to YAML and back using minimal YAML markup and an easy to use API. YamlBeans can parse YAML from other sources to Java objects, but because this is not its primary goal, some of the more esoteric features from the YAML specification may not be supported. If would be nice if this is conveyed in your comparison page. It might make sense to have code snippets showing how Java objects are round tripped, along with what the YAML looks like.
It shouldn't be hard to have something good to say about each library.
from yamlbeans.
Related Issues (20)
- YamlWriter changes the order of the bean attributes when writing to the file HOT 1
- The problem with the Russian language in YamlWriter HOT 2
- Javadocs can't be generated due to warns / errors HOT 2
- Differnt JUnit dependency versions between Maven and local lib folder
- Bug in processing urlencoded tag.
- yamlbeans is not connected with travis-ci. After the PR submitted by the open source maintainer, it is automatically built and the test case is executed. HOT 3
- Forced quotes around string values HOT 2
- I want to release version 1.15. HOT 1
- link to maven central in README is broken HOT 1
- still facing #66 with version 1.15
- Default clip chomping on block scalars does not include trailing newline HOT 2
- Two different licenses HOT 1
- Integrating yamlbeans into OSS-Fuzz
- Relaese Version 1.16 found but the GAV in pom.xml is 1.16-SNAPSHOT HOT 1
- Y
- Use the Data safety section | Google Play
- Release YamlBeans to Maven Central? HOT 6
- Commas seem optional in flow sequences - is this intended? HOT 2
- NPE in some tests
- trouble with the tokenizer related to the colon (:) character
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 yamlbeans.