Tag: JSON

  • .NET Core 2.1 is Returning JSON with Lowercase Properties

    Hi everyone, Just testing out .Net Core 2.1 and noticed that all of my JSON properties are being returned in lowercase despite being defined as uppercase. It turns out that this is configurable: // Change from this services.AddMvc(); // To this services .AddMvc() .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver()); Check out these links for more…

  • JSON Issue: This request has been blocked because sensitive information – MVC

    Hey everyone, Started redoing Learner Lessons in MVC4 and AngularJS today. I ran into this little issue while trying to retrieve JSON: This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet It…

  • Missing Partial (JSON Response) – Ruby on Rails

    Hey everyone, I’ve just added pagination (Kaminari) to make an infinite scroll list a little easier to use. Unfortunately, I ran into the following error – had me stumped for a while: Missing partial /contents/content_list_item with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder, :coffee]}. Searched in: * “/home/chris/funny/app/views” * “/home/chris/.rvm/gems/ruby-1.9.3-p327/gems/kaminari-0.14.1/app/views” The solution was fairly simple, but adding a…

  • Remote JSON Source – Ruby on Rails

    Hey everyone, Just a quick post on how to retrieve a remote JSON source so I don’t forget. require ‘open-uri’ require ‘json’ #Retrieve source (controller/model) @results = JSON.parse(open(“http://www.myjsonsource.com/jsonfeed_num1”).read) #In view That’s all there is to it, let me know if you have any problems!

  • Events Only Showing in Month View – FullCalendar

    Hey everyone, Ran into a bit of a problem with FullCalendar today after setting up a JSON feed. My events were only appearing in the month view. This StackOverflow post explains that this is due to the fact that the allDay property wasn’t set. Original JSON [ “0”, { “title”: “Test event”, “id”: “821”, “start”:…

  • Format JSON – JSONLint

    Hey everyone, Just a site that I came across today that was pretty useful for JSON: http://jsonlint.com/ I’ve been working with jQuery FullCalendar and needed some sample data. It has the option to use a JSON feed but mine wasn’t working for some reason. JSONLint allowed me to both format and validate it. Let me…

Create a website or blog at WordPress.com