Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to JSON with multiple 'objects' in the same YAML file #44

Open
macCesar opened this issue Mar 6, 2022 · 0 comments
Open

Convert to JSON with multiple 'objects' in the same YAML file #44

macCesar opened this issue Mar 6, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request feature

Comments

@macCesar
Copy link

macCesar commented Mar 6, 2022

I'm not sure if this is a feature request or a bug report.

But yaml-plus-json can't convert files that contain multiple 'objects', 'blocks', or whatever they are called in the YAML universe!! :-)

Or is it a limitation of the YAML schema ?? Because another extension says that the file is correct..

BUT.. A preview YAML extension can't show it.. Unless there is only one object in the file.

Dimension.yml file:

--- 
name: Dimension
extends: Size
summary: A simple object consisting of the position and size measurements. Effectively combines <Size> and <Point> but ensures numeric x/y values.
since: "2.0.0"
description: |
  When a dimension is returned by the [rect](Titanium.UI.View.rect) property, `x` represents the
  view's left position, and `y` represents the view's top position.

  The [size](Titanium.UI.View.size) property returns a dimension object with `x` and `y` both set
  to 0.
properties:
  - name: x
    summary: The x-axis coordinate of the position. When returned by <Titanium.UI.View.rect> the position is relative to it's parent.
    type: Number

  - name: y
    summary: The y-axis coordinate of the position. When returned by <Titanium.UI.View.rect> the position is relative to it's parent.
    type: Number

---
name: DimensionWithAbsolutes
extends: Dimension
summary: An extension of <Dimension> where Android returns additional absolute X/Y values/properties for <Titanium.UI.View.rect>
properties:
  - name: absoluteX
    summary: The x-axis coordinate of the position relative to the main window.
    type: Number
    platforms: [android]

  - name: absoluteY
    summary: The y-axis coordinate of the position relative to the main window.
    type: Number
    platforms: [android]

As you can see in the example code.. It contains two ( --- ) objects!!! And yaml-plus-json can't convert it!! :-(

IF I leave either one of them.. The file is converted without a problem!!.

Other than that.. IT IS A GREAT TOOL!! Thanks!!

The ability to right-click a folder and convert everything is an EXCELLENT feature!!

Is there a setting to recursively process every subfolder ???

@macCesar macCesar added enhancement New feature or request feature labels Mar 6, 2022
@macCesar macCesar changed the title Convert yaml with multiple 'objects' in the same file Convert to JSON with multiple 'objects' in the same YAML file Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

2 participants