• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. json to SKILL

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 142
  • Views 9116
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

json to SKILL

AurelBuche
AurelBuche over 3 years ago

Hi All,

I was wondering if there is a simple way to render JSON into a LISP readable format (i.e. with parentheses so I could use lineread)?

I remember a post from Andrew to convert .xml the same way using xsltproc and a custom stylesheet. I am looking for a similar solution

Cheers

Aurélien

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Hi Aurélien,

    I've never written one - one of those things I'd get to if I had a burning need. If I was going to write a quick-and-dirty (similar to the xlstproc approach) I'd probably write a simple python script to use json.load() to import into a Python dictionary (which can then contain dictionaries and arrays within) and then a recursive function to traverse that and dump it out as an s-expression.

    Of course, it would probably be worth converting one of the common-lisp implementations of a JSON reader into SKILL, but I've not done that either.

    Maybe somebody else has? We have had a few enhancement requests to provide such a function, but they've not made it to the top of the pile yet.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    Hi Aurélien,

    I've never written one - one of those things I'd get to if I had a burning need. If I was going to write a quick-and-dirty (similar to the xlstproc approach) I'd probably write a simple python script to use json.load() to import into a Python dictionary (which can then contain dictionaries and arrays within) and then a recursive function to traverse that and dump it out as an s-expression.

    Of course, it would probably be worth converting one of the common-lisp implementations of a JSON reader into SKILL, but I've not done that either.

    Maybe somebody else has? We have had a few enhancement requests to provide such a function, but they've not made it to the top of the pile yet.

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • AurelBuche
    AurelBuche over 2 years ago in reply to Andrew Beckett

    Thanks Andrew, I guess the Python approach is effectively the simplest according to my javascript skills

    I was looking for jq solutions but I am not sure it is worth learning for this very purpose

    Cheers

    Aurélien

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information