Comments (2)
Hi @abhaybhargav, glad you find Cuetorials helpful.
You can use, copy, or reference the following function (and those that come after) (https://github.com/hofstadter-io/cuetils/blob/main/structural/output.go#L115) These are essentially the same calls that CUE makes when using the CLI.
Note, there are some inconsistencies in how CUE encodes values that will hopefully be rectified in time. In particular YAML uses the AST and JSON uses the ADT, which has more detail and context.
I should be adding a section about this under the go-api/replicating-the-cli
sometime soon. Need to show how to load CUE like the cue
CLI first, which requires some temp workaround (details here: hofstadter-io/hof#22 (comment))
from cuetorials.com.
Please ignore this question. I found the MarshalJSON()
function. I hadnt looked enough. Thanks :)
from cuetorials.com.
Related Issues (20)
- Scripting with Cue" HOT 2
- invalid string: invalid string: invalid whitespace HOT 4
- Combine, minify, hash website assets HOT 1
- Either-or Fields Pattern not referencing definition HOT 3
- Translation work HOT 1
- Chinese Edition HOT 5
- Contributors Page
- Script to list files which need translation
- Font(s) not loading HOT 1
- Workflows example nit
- Project using CUE
- Rainbond using CUE HOT 5
- Menu is not showing on safari / firefox HOT 1
- AnyOf Pattern doesn't work when fields are optional and array HOT 3
- Walkthroughs missing? HOT 2
- Validation fails to build instance HOT 1
- Bounded recursion example breaks on cue 0.6 HOT 2
- Website down? HOT 1
- Compose spec import error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuetorials.com.