Arrays of objects are not split up in the yaml outline
See original GitHub issueHere is an example image: https://cl.ly/0d3J3r3R202l
The text:
init_config:
instances:
- name: words
url: http://localhost:8080/
http_response_status_code: 200
timeout: 5
skip_event: true
tags:
- name:words
- type:app
- env:prod
- name: words2
url: http://localhost:8081/
http_response_status_code: 200
timeout: 5
skip_event: true
tags:
- name:words2
- type:app
- env:prod
instances
just appearing as an array with a bunch of duplicate values. http://yaml-online-parser.appspot.com/ seems to correctly parse this as:
{
"instances": [
{
"http_response_status_code": 200,
"name": "erights http://localhost:8080/",
"timeout": 5,
"tags": [
"name:erights",
"type:app",
"env:prod"
],
"url": "http://localhost:8080/",
"skip_event": true
},
{
"http_response_status_code": 200,
"name": "erights http://localhost:8080/",
"timeout": 5,
"tags": [
"name:erights",
"type:app",
"env:prod"
],
"url": "http://localhost:8080/",
"skip_event": true
}
],
"init_config": null
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
YAML equivalent of array of objects in JSON - Stack Overflow
The equivalent of a JSON array in YAML is a sequence, which looks like either of these (which are equivalent): # flow style...
Read more >Variables in YAML pipeline are not allowing to define array
Based on the docs I should be able to define any content for the variable in YAML pipeline, but when I try this,...
Read more >Render of YAML array is not using minItems and maxItems ...
Use an array definition of a schedule in YAML that uses minItems of 2 and maxItems of 2. When rendered in GitLab it...
Read more >YAML Tutorial: Everything You Need to Get Started in Minutes
False is indicated with False, Off, or No. --- foo: True bar: False light: On TV: Off. Arrays. You can specify arrays or...
Read more >Comprehending YAML - chan.dev
The dashes - indicate that the root structure is an array (sequence). But each array item comprises a descrete object (mapping) with a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should work now as we’ve implemented hierarchical document symbols.
That would have to be done on this extensions side not on your side.
Perhaps that could work. Though i’m not entirely sure if the language server protocol states whether or not the text should be empty strings or not. Additionally, the regular document symbols (ctrl+shift+o for me on VSCode i’m not sure if thats the default or not though) would just have an empty text field for those objects which wouldn’t be really helpful. I’ll play around with it and see.