Originally created by @vamsi-98 on GitHub (Feb 17, 2024).
In the example for entries I see that object is used as key. But when I evaluate the example it throws the below error
Is the code in the docs correct or am I missing something?
Originally created by @vamsi-98 on GitHub (Feb 17, 2024).
In the [example](https://pkl-lang.org/main/current/language-tutorial/01_basic_config.html#entries) for entries I see that object is used as key. But when I evaluate the example it throws the below error
<img width="862" alt="image" src="https://github.com/apple/pkl/assets/42208075/cc3958f8-c583-42f4-a844-a245807fa3b8">
Is the code in the docs correct or am I missing something?
@stackoverflow commented on GitHub (Feb 19, 2024):
Indeed, this example doesn't render properly to json or yaml, just to pcf. Probably a good idea to change it to something that's json renderable.
@stackoverflow commented on GitHub (Feb 19, 2024):
Indeed, this example doesn't render properly to `json` or `yaml`, just to `pcf`. Probably a good idea to change it to something that's `json` renderable.
@vamsi-98 commented on GitHub (May 20, 2025):
I was thinking it can be changed to something like this, not sure if it exactly highlights the purpose of the example for entries.
```
pigeonShelter {
["bird"] {
name = "Common wood pigeon"
diet = "Seeds"
taxonomy {
species = "Columba palumbus"
}
}
["address"] = "355 Bird St."
}
count = "value"
birdCount {
["value"] = 42
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @vamsi-98 on GitHub (Feb 17, 2024).
In the example for entries I see that object is used as key. But when I evaluate the example it throws the below error
Is the code in the docs correct or am I missing something?
@stackoverflow commented on GitHub (Feb 19, 2024):
Indeed, this example doesn't render properly to
jsonoryaml, just topcf. Probably a good idea to change it to something that'sjsonrenderable.@vamsi-98 commented on GitHub (May 20, 2025):
I was thinking it can be changed to something like this, not sure if it exactly highlights the purpose of the example for entries.