Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    JSON RPC und Sonderzeichen

    Scheduled Pinned Locked Moved Entwicklung
    5 Posts 2 Posters 2.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      alex123
      last edited by

      Ich habe probleme mit der JSON RPC Schnittstelle wenn ich Umlaute im Titel eines Objektes verwende

      die anfrage wird im UTF-8 format gesendet.

      request:

      {"id":44,"method":"cmdb.object.update","params":{"id":1965,"title":"Lehrgangsgebühren","apikey":"123456789"},"jsonrpc":"2.0"}
      

      response:

      {"result":null,"error":{"code":-32700,"message":"Parse error","data":{"error":"Invalid JSON request sent"}},"id":0}
      

      Wenn im JSON Objekt keine Umlaute vorkommen, gibts keine probleme.

      1 Reply Last reply Reply Quote 0
      • A Offline
        alex123
        last edited by

        Das Problem liegt bei der Umwandlung in htmlentities. ab der php version 5.4 wird standardmässig UTF-8 verwendet, womit das problem gelöst wäre. heisst also php 5.4 wäre die mindestanforderung wenn man die JSON-RPC schnittstelle verwenden will. sonst müssten anpassungen an den entsprechenden stellen im idoit quellcode vorgenommen werden damit php 5.3.x keine probleme bereit.

        http://php.net/manual/de/function.htmlentities.php

        1 Reply Last reply Reply Quote 0
        • S Offline
          senycorp
          last edited by

          Hallo alex,

          das Problem wurde aufgenommen und wird im nächsten Minor-Release behoben. Allerdings konnte nur ein Encoding-Problem festgestellt werden. Den von dir angegebenen Error konnte ich leider nicht reproduzieren.

          VG

          Selcuk

          1 Reply Last reply Reply Quote 0
          • A Offline
            alex123
            last edited by

            @skekec:

            Hallo alex,

            das Problem wurde aufgenommen und wird im nächsten Minor-Release behoben. Allerdings konnte nur ein Encoding-Problem festgestellt werden. Den von dir angegebenen Error konnte ich leider nicht reproduzieren.

            VG

            Selcuk

            das ist super. der fehler aus dem ersten beitrag lag am json-rpc client, den ich verwende, betrifft also nicht idoit.

            was noch in diesem zusammenhang zu überprüfen wäre, wäre der einsatz von php 5.4.x. da zb bei der methode "htmlentities" UTF-8 im gegensatz zu version 5.3.x erzwungen wird. ich hatte mit php 5.4.x probleme objekttitel mit umlauten über die weboberfläche zu speichern.

            1 Reply Last reply Reply Quote 0
            • S Offline
              senycorp
              last edited by

              Hi,

              generell wird von dem Einsatz von i-doit in einer PHP 5.4 Umgebung abgeraten. Die Requirements empfehlen weiterhin die Verwendung einer 5.3.x-Version.
              Trotzdem haben wir dies als unschönen Bug gefixt, welcher im nächsten Minor-Release ausgeliefert wird.

              Falls dir noch mehr auffällt: Immer her damit!

              Vielen Dank

              Selcuk

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post