similar to: JSON output replacing & with "\u0026 "

Displaying 20 results from an estimated 30000 matches similar to: "JSON output replacing & with "\u0026 ""

2010 Mar 31
1
[PATCH] Upgrading the server to work with Rails 2.3.4.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- src/app/controllers/application_controller.rb | 2 +- src/config/environment.rb | 2 +- src/config/initializers/new_rails_defaults.rb | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
2007 Sep 28
2
Rails shouldn't output invalid JSON by default
Please check out this ticket (which would explain almost everything): http://dev.rubyonrails.org/ticket/8762 So basically, Rails to_json methods produces invalid JSON out of the box as it doesn''t quote all hash keys. This is valid JSON: { "id": 6589, "code": "SIN", "name": "Singapore" } This is not (Rails'' JSON encoders
2009 Jul 05
2
JSON data not decoded in Rails
Hello all, I''m trying to send some json data from the browser to the server using prototype without success. On the server side ActiveSupport::JSON.decode isn''t decoding the data. Here is the code: Javacript: <a href="#" onclick=''send();return false;''>click</a> <script> function send() { var send_data_url =
2008 Apr 25
2
json => hash in Ruby
Hi everyone, I would like to decode a json string and transform it into a hash in ruby. I tried json = "{\"userid\" : \"21\", \"friendid\" : \"9\"}" hash = ActiveSupport::JSON.decode(json) puts hash[:userid] however, this gives NIL back. How do I have to do this? Thanks for any help! --~--~---------~--~----~------------~-------~--~----~ You
2010 May 28
1
cookie has key/value pairs and lost order after JSON decode
If a cookie has several items, and is encoded as JSON text as the value of the cookie, the order is actually apparent in the cookie''s text But if JSON.decode is used: ActiveSupport::JSON.decode(cookies[''item_list'']) and the result is actually in a hash, then the ordering is lost... Is it true that if the original JSON object has an array of hashes (1 key and 1
2007 Dec 07
2
[ActiveSupport] Patches needing review: re-organization of #to_query methods, preservation of XML/JSON content-type
Just a quick pointer to some ActiveSupport patches hoping for reviews: Puts Array#to_query and Object#to_query in the right places in ActiveSupport - http://dev.rubyonrails.org/ticket/10395 Preserve user-specified content type for XML and JSON rendering (currently it''s overridden and set to Mime::XML/Mimi::JSON - http://dev.rubyonrails.org/ticket/10388 Oh and a tiny patch for
2012 Jul 25
1
A minor beef with JSON::decode
Hiya, So, what was the impetus behind having ParamsParser create Date and DateTime objects out of application/json requests? The project I''m on expects parameters to be received as standard types (bools, numbers, strings, arrays, and hashes). Rails shouldn''t try to convert objects that are explicitly passed as these types; it should be up to the application to do that.
2006 May 27
5
ActiveSupport JSON working?
Hi, I am trying to convert a hash to JSON using ActiveSupports built in .to_json. I am doing similar to the example below but are there certain strings that could go in place of ''bar'' or ''rez'' that will break the to_json method? I am using a very long string from rjs output in place of ''bar''. Perhaps .to_json is not ready yet? Thanks, Peter
2007 Dec 27
5
Rails 2.02 dropped JSON attribute tag ?
Hey there I was scratching my head over why my application breaks when I run on a local server but works on my remote server. It turns out that my local server is Rails 2.0.2 and my remote server is 1.2.3 and I expect the tag "attributes" to be passed with a json stream, before parsing. Unfortunately, this was dropped in 2.0.2. Is there any documentation on this? Any way to get it back?
2007 Aug 07
2
"badly formed JSON" exception
I tried to implement the "Rendering JSON in actions" example from http://wiki.rubyonrails.com/rails/pages/HowtoGenerateJSON : @headers["Content-Type"] = "text/plain; charset=utf-8" data = { :foo => ''bar'', :etc => ''rez'' } render :text => data.to_json When I try to decode this in javascript with
2018 Nov 15
4
[Bug 1297] New: Replacement for nft export vm json?
https://bugzilla.netfilter.org/show_bug.cgi?id=1297 Bug ID: 1297 Summary: Replacement for nft export vm json? Product: nftables Version: unspecified Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P5 Component: nft Assignee: pablo at netfilter.org
2011 Jul 14
1
rails 3.0.9 ArgumentError (redundant UTF-8 sequence):
Hi guys, I have a simple controller def gmap @intentsearches = Intentsearch.all logger.info @intentsearches respond_to do |format| format.html {render :gmap} format.xml {render :xml => @intentsearches } format.json { render :json => @intentsearches } end end and want a json response, but i do get the following error Completed 500 Internal
2023 Dec 05
3
[Bug 1726] New: invalid json generated by ipset list -output json
https://bugzilla.netfilter.org/show_bug.cgi?id=1726 Bug ID: 1726 Summary: invalid json generated by ipset list -output json Product: ipset Version: unspecified Hardware: x86_64 OS: Debian GNU/Linux Status: NEW Severity: trivial Priority: P5 Component: default Assignee:
2014 Dec 01
2
Modified metaflac add --output-json
Hi, I modified the metaflac program to output in JSON format if the --output-json switch is used, and made a simple Go program to demonstrate use of the output. I imported the MIT licensed json-c library into src/share/json-c and put headers in include/share/json-c. For example, # metaflac --output-json --list myfile.flac example output: https://gist.github.com/waitman/847a8cae4a650a8898ee If
2007 Mar 28
7
Rails, REST and JSON
Hi everyone, I''m writing a lightweight AJAX application using Rails on the server side as a RESTful web service provider. I need the web service to support both JSON and XML I/O. Outputting data in XML and JSON is easy (using to_xml and to_json), and it''s also easy to do XML input as Rails does it for you automatically. Is it possible to somehow have the same automatic parsing
2014 Dec 02
2
Modified metaflac add --output-json
On Mon, Dec 1, 2014 at 10:40 PM, ???? ?????? <bart.gopnik at gmail.com> wrote: > Please help me solve the following problem: > > FLAC tools have a lots of warnings about non-subset files during > encoding, but unfortunately don't have easy way to check/test existing > FLAC stream for subset compliance. > > "flac -a" generates the big text file that has
2010 Aug 26
2
Today: constant JSON::Parser not defined
(Using the latest 3-0-stable and rvm, and ruby-1.9.2-p0) Yesterday everything worked, my own changes are very minor and in the application only. Did anything change that could have caused this problem? Unfortunately simply going back in rails alone to the original "RC2" git-tag did not immediately help, so it may be some other problem (on my own system only, even if I''m
2009 May 07
2
Outputting strict JSON
Does any body know how I can output JSON so that instead of getting: {booking: {id: 1, name: "foo"} You get this instead: {id: 1, name: "foo"} Can''t find a solution for this at all Thank you for any help.
2019 Nov 06
2
[OT] smbclient json output
hello, i'm off topic so I apologize in advance, I would just like to know what is the correct place to do the "feature request": have smbclient output in json format.
2010 Sep 26
1
Rails 3 basic Get JSON with jQuery and output on the page flow question
Rails newbie, thanks for help with this hopefully basic JSON type question.... I have a model Books in my app, which belong_to users. What''d I''d like to learn how to do, is use jQuery to get a JSON object of the books that the user owns (current_user). And then use jQuery to list the results out on a div (id=targetdiv). Where I''m not certain, is this something Rails 3