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

JSON FromText Limited to <14K characters #3570

Open
JustinGrote opened this issue Jul 12, 2021 · 2 comments
Open

JSON FromText Limited to <14K characters #3570

JustinGrote opened this issue Jul 12, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@JustinGrote
Copy link

JustinGrote commented Jul 12, 2021

@anthony-c-martin

Bicep version
Artifact from #3510

Issue
Cannot import a json more than ~14k characters, which is a problem if you want to define, say, a library of builtin policies and their associated IDs which is one of my current use cases for this.

Reproduce
Make a json with more than 14k characters
Try to import the JSON, error will show that the size is limited.

Potential Solutions

  1. [Ideal] Offer a "tree-shaking" option via a decorator or something to the var so that, when the ARM template is built, the expression only contains the json entries that are referenced rather than the entire json file, and update the LSP to allow for longer strings for the jsontext import.
  2. Increase the limit if possible
  3. Transparently split it into multiple expressions?
@ghost ghost added the Needs: Triage 🔍 label Jul 12, 2021
@JustinGrote
Copy link
Author

Workaround currently by splitting policy files into their categories. This is pretty nice.
image

@JustinGrote
Copy link
Author

Even better!
image

@alex-frankel alex-frankel added enhancement New feature or request and removed Needs: Triage 🔍 labels Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants