question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flat JSON is treated like nested

See original GitHub issue

Describe the bug

{
  "FOO": "Foo text",
  "FOO.BAR": "Bar inside foo text"
}

If I use FOO the extension fails to load the language because it seems to convert it to a nested object instead of being flat.

Extension Version i18n Ally

Framework/i18n package you are using vue-i18n

To Reproduce

  1. Create a locale file like es.json and add the next code
{
  "FOO": "Foo text",
  "FOO.BAR": "Bar inside foo text"
}
  1. Save it and it doesn’t show as an available language.
  2. Rename FOO to FOO.SOMETHING and it works.

Device Infomation

  • OS: Any
  • Version: 1.11.4
  • VSCode Version: 1.41.1

Extension Log

📑 Loading (es) src/locales/es.json
	🐛 Failed to load TypeError: Cannot create property 'BAR' on string 'Foo text'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
antfucommented, Feb 6, 2020

Hi everyone, the support is landed in v1.12.0 (experimental). Please check it out, feedbacks are welcome! Thanks!

cc @JJBocanegra @guidokessels @zeakd

3reactions
antfucommented, Feb 4, 2020

Yes I have already planned to support that. But due to the China coronavirus situation, I have to deal some real-world problem before I dig into the implement. Thanks for understanding and keep tuned 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flat JSON is treated like nested · Issue #184 · lokalise/i18n-ally
Yes. This is a known issue. Due to the internal design of i18n ally, it always unflat the flatten keys to nested object...
Read more >
"Flat" JSON versus JSON with nested structures - IBM
Flat JSON is useful when you need KV pairs but you don't want nested structures. Some analytics platforms ingest KV-pair format data faster ......
Read more >
How to flatten multilevel/nested JSON? - python - Stack Overflow
Issue with my structure is that I have quite some nested dict/lists when I convert my JSON file. I tried to use pandas...
Read more >
Flatten Hierarchical(Nested) Json Data in Snowflake Vs ...
Datatypes such as JSON arise out of a number of data needs. ... process to flatten the nested json data in both Snowflake...
Read more >
flat vs nested data layer? - Experience League Community
I would like to know pros and cons of nested and flat data layer to implement on a web property? Also, would like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found