Code Monkey home page Code Monkey logo

Comments (5)

stoiveyp avatar stoiveyp commented on June 22, 2024

Hi @georgeduckett - the documentation around parameters still says that although you can create parameters this way, it's not recommended:
https://developer.amazon.com/docs/alexa-presentation-language/apl-layout.html#parameters

For convenience, a simple parameter name may be used instead of the parameter object (such as "title" instead of { "name": "title", ... }. This format is not recommended, but it does allow compact layout definition for those cases where no type coercion or default values are required

This is why I've left parameters the way they are currently. I will look at making an implicit conversion to make it easier to deserialize from a simple string though.

from alexa.net.apl.

stoiveyp avatar stoiveyp commented on June 22, 2024

I've raised the issue with the Alexa team at https://forums.developer.amazon.com/questions/211862/correct-apl-parameter-format.html to get clear confirmation too 👍

from alexa.net.apl.

georgeduckett avatar georgeduckett commented on June 22, 2024

Ahh ok, that makes sense thanks. It is frustrating when things get inconsistent between the APL designer, devices and different areas of the documentation. Thanks for raising the issue with them!

from alexa.net.apl.

stoiveyp avatar stoiveyp commented on June 22, 2024

Hi @georgeduckett

Further update. I had some downtime this afternoon and I've put the code change in v4.1 https://www.nuget.org/packages/Alexa.NET.APL/4.1.0

What this now does is only output the full expanded parameter object if there's a property other than "name" in use, otherwise it just outputs the name as a string. This is both for layout and command parameters. Should give you the output you need and still allow both formats to be deserialized from JSON.

Hope this helps

from alexa.net.apl.

georgeduckett avatar georgeduckett commented on June 22, 2024

Thanks for the incredibly quick turnaround for this and #54! 👍 👍

from alexa.net.apl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.