Skip to content

[Bug]: type="json" wird als Fehler angezeigt #2129

Open

Description

@mcuiobroker

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (use the search!)
  • This issue is not described in the adapter documentation / FAQ (read the docs!)

Script type

Javascript

The problem

Image

Man kann es aber ohne Probleme in den Objekten anlegen

Image

let moodvisDP = '0_userdata.0.moodvis.config'

createStateAsync(moodvisDP,  {read: true, write: true, name: "config", type: "json", role: "", def: JSON.stringify({}) });

https://www.iobroker.net/#en/documentation/dev/objectsschema.md

Image

iobroker.current.log (in debug mode!)

kein Eintrag

Version of nodejs

22.22.0

Version of ioBroker js-controller

7.1.0

Version of adapter

9.0.18

Activity

  1. mcm1957 commented on Feb 24, 2026

    @mcm1957
    Contributor

    Der Typ 'json' ist lt. Typdefinition NICHT zulässig und wir daher im Editor als falsch markiert.
    Dies steht im Widerspruch zur Dokumentation.

    Siehe auch Issue ioBroker/ioBroker.js-controller#3239

  2. klein0r commented on Mar 1, 2026

    @klein0r
    Collaborator

    Darüber bin ich vor Jahren auch mal gestolpert. Soweit ich weiß, sollte man lieber type string mit role json nutzen.
    Oder halt object bzw array (was ja dann auch nur json intern ist).

    https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md#common

  3. mcm1957 commented on Mar 1, 2026

    @mcm1957
    Contributor

    Siehe Issue ioBroker/ioBroker.js-controller#3239
    und https://forum.iobroker.net/post/1328053

    Wir sollten klar festlegen ob nun ein state mit TYP json erünscht und zulässig ist oder nicht. Dementsprechend sind die einen oder die anderen Dinge im Code / Spec / Docu zu korrigieren.

  4. GermanBluefox commented on Mar 18, 2026

    @GermanBluefox
    Contributor

    json muss aus Admin raus

  5. mcm1957 commented on Mar 18, 2026

    @mcm1957
    Contributor

    Kurzfassung (lt. Meeting v. 183.2026)

    type: "json", role: ""

    ist falsch, Der type json ist unzulässig. Die Dokumentation ist veraltet.
    Außerdem ist ein state ogne rol definitiv auch falsch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions