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

Remove opening and closing [] #41

Open
honzik20 opened this issue Apr 12, 2019 · 5 comments
Open

Remove opening and closing [] #41

honzik20 opened this issue Apr 12, 2019 · 5 comments

Comments

@honzik20
Copy link

Is it possible to remove the opening and closing square brackets?

@wtfatty
Copy link

wtfatty commented Oct 11, 2021

Yes, please!

@eproxus
Copy link
Collaborator

eproxus commented Oct 11, 2021

Do you want just one object? In that case you could use a single object sheet.

@wtfatty
Copy link

wtfatty commented Oct 11, 2021

My output should be like this:

{
	"Platform1" :
	[
		{
			"Locale" :
			{
				"pt-BR" : "Localization 1",
				"en-US" : "Localization 2"
			},		
			"URL" : "http://someurl.com",
			"Type" : 1
		},
		{
			"Locale" :
			{
				"pt-BR" : "Localization 1",
				"en-US" : "Localization 2"
			},         
			"URL" : "http://someurl.com",
			"Day" : 11,
			"Month" : 10,
			"Year" : 2021,
			"Type" : 2
		}
   ],
	"Platform2" :
	[
		{
			"Locale" :
			{
				"pt-BR" : "Localization 1",
				"en-US" : "Localization 2"
			},          
			"URL" : "http://someurl.com",
			"Type" : 1
		},
		{
			"Locale" :
			{
				"pt-BR" : "Localization 1",
				"en-US" : "Localization 2"
			},        
			"URL" : "http://someurl.com",
			"Day" : 11,
			"Month" : 10,
			"Year" : 2021,
			"Type" : 2
		}
   ]
}

I cannot use single object sheet because I need the others tab to nest the content.
Also, do you have any idea on how to achieve

"Platform1" :
	[

@eproxus
Copy link
Collaborator

eproxus commented Oct 12, 2021

I think what you want is currently not possible (unless you can combine the single object sheet and the keyed/list sub properties somehow but I doubt it). Removing the outer brackets would produce invalid JSON so that is also not supported.

@eproxus
Copy link
Collaborator

eproxus commented Oct 12, 2021

My best advise (because the tool is no longer maintained) is to either fork it and send a pull request with new features, or use an external tool (like jq) to tweak the JSON after it is produced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants