Le 2014-05-12 09:40, Dvir Levy a écrit :
Hello,Im not sure if this is the right address.I am trying to create a PHP library to work with Chef API.I am using hosed Chef and this is the library : https://github.com/dv1r/php-chefI have also opened a ticket in support : https://www.getchef.com/support/tickets/17534and there is an open Stack-Overflow question : http://stackoverflow.com/questions/23456790/opscode-chef-rest-api-invalid-jsonAll of the information to my problem is there, but to sum upEvery PUT/POST request that contains data being passed to the APIcomes back as "Invalid JSON".I've looked at the request from every direction I could think of and it should work.Is there any way someone here can help me?Does chef expect a kind of JSON that I've never heard of?Thank you,Dvir LevyP.SIf this is the wrong place, could you point me to the right place? :)Answered on SO.
Mainly the problem is json to object, new property and object to json.
I had to cast to an array to ensure adding items works properly with the library.
Hope it helps.
Tensibai
Archive powered by MHonArc 2.6.16.