Comments (3)
This is an open question for users: whether arrays should be "sticky" if they're opened multiple times. At the moment, both simple and complex arrays can be reopened:
[complex]
key: value
[]
[complex]
key: value
[]
[simple]
* value
[]
[simple]
* value
[]
{
"complex": [{"key": "value"}, {"key": "value"}],
"simple": ["value", "value"]
}
Since an arrays type is decided by whether a key: value
or a * value
is found first, I think that if you reopen an array, it makes sense in a way to continue to parse only either complex or simple values. (Inside a complex array, * value
isn't treated as an array element, and vice versa.)
@minikomi, @archietse - which do you think would be most intuitive for users?
from archieml-js.
Yep, I didn't realize the key / simple text sticky rule while I was playing about with this. I think once you know the rule, the current behavior makes sense.
from archieml-js.
We've been discussing this behavior at NYT, and think you're original assumption that later array definitions should overwrite prior definitions is more intuitive. The most recent proposal for the spec reflects this, and archieml-js v0.2.0
has been updated to function this way.
from archieml-js.
Related Issues (20)
- Only one line in a multi-line string can be escaped; multiple should be possible
- Test suite HOT 3
- Since commit a89c313... objects no longer "close" as they used to
- Is there a json to AML method? HOT 1
- Document crashes JS parser (but works in Ruby) HOT 3
- Support JSON-LD HOT 2
- Freeforms shouldn't require trailing newlines to pick up last line of text
- Support for numbers
- Exclude unnecessary files from production installs
- Sandbox doesn't escape output
- Converting JSON to ArchieML HOT 1
- Google autoformatting tends to break arrays of strings
- Cut npm release of v0.5.0? HOT 1
- 'Using with Google Documents' instructions, error
- Add SECURITY.md
- Multi-line values are created when they shouldn't be HOT 3
- In-line JSON parsing HOT 1
- Arrays should override strings that already exist at a key HOT 1
- Make inline comments configurable
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 archieml-js.