Skip to main content

Home/ HealthcareMetadata/ Group items tagged JSON

Rss Feed Group items tagged

Malcolm McRoberts

javascript - Convert JS object to JSON string - Stack Overflow - 0 views

  • var j={"name":"binchen"}; JSON.stringify(j); // '{"name":"binchen"}'
Malcolm McRoberts

Getting a diff of two JSON strings using Java code - Stack Overflow - 0 views

  • I had the exact same problem and ended up writing my own library: https://github.com/algesten/jsondiff It does both diffing/patching. Diffs are JSON-objects themselves and have a simple syntax for object merge/replace and array insert/replace. Example: original { a: { b: 42 } } patch { "~a" { c: 43 } } The ~ indicates an object merge. result { a: { b: 42, c: 43 } }
Malcolm McRoberts

jsonengine - Simple and ultra-scalable JSON storage on Google App Engine. No server-sid... - 0 views

  • Supports Google account and OpenID authentication and access control on each JSON document. Provides admin console for setting the access control.
Malcolm McRoberts

Play Framework: Binding and Validating Objects and Rendering JSON Output | Packt Publis... - 0 views

  • How to do it... Create your entities first. This example consists of a user, an address, and a SuperSecretData entity: @Entitypublic class User extends Model { @SerializedName("userLogin") public String login; @NoJsonExport public String password; @ManyToOne public Address address; @OneToOne public SuperSecretData secrets; public String toString() { return id + "/" + login; }}@Entitypublic class Address extends Model { public String street; public String city; public String zip;}@Entitypublic class SuperSecretData extends Model { public String secret = "foo";}
Malcolm McRoberts

design - Best Practice for CouchDB Document Versioning - Stack Overflow - 0 views

  • It's more typical to keep older versions of your document inside your current revision (either as JSON or, often, as an attachment). For the JSON case; { "_id":"foo", "_rev":"3-fsfsfsdf", "foo":"current value of foo", "history": { "2": { "foo":"previous version of foo" }, "1": { "foo":"initial version of foo" } } }
  • t's often simpler to push the full old version of the document into an attachment instead. This pattern is common enough that CouchDB ships with a library, jquery.couch.js, that implements it (in the saveDoc(doc) function).
Malcolm McRoberts

XEP-0295: JSON Encodings for XMPP - 0 views

  • Example 4. XML-encoded Message with Security Label<message to='romeo@example.net' from='juliet@example.com/balcony'>    <body>This content is classified.</body>    <securitylabel xmlns='urn:xmpp:sec-label:0'>        <displaymarking fgcolor='black' bgcolor='red'>SECRET</displaymarking>        <label><esssecuritylabel xmlns='urn:xmpp:sec-label:ess:0'>            MQYCAQQGASk=        </esssecuritylabel></label>    </securitylabel></message>  Example 5. JSON-encoded Message with Security Label{"s":"<message to='romeo@example.net' from='juliet@example.com/balcony'><body>This content is classified.</body><securitylabel xmlns='urn:xmpp:sec-label:0'><displaymarking fgcolor='black' bgcolor='red'>SECRET</displaymarking><label><esssecuritylabel xmlns='urn:xmpp:sec-label:ess:0'>MQYCAQQGASk=</esssecuritylabel></label></securitylabel></message>"} 
Malcolm McRoberts

How to create RESTful Web services in 10 minutes with Visual Studio 2012 AiM website | ... - 0 views

  • By default the API return XML, but we’ll use JSON here, as it’s also becoming a standard. To do so we must add  the following code in the register() method located in the file WebApiConfig.cs config.Formatters.XmlFormatter.SupportedMediaTypes.Remove( config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault(t => t.MediaType == 'application/xml'));
Malcolm McRoberts

PhantomJS | PhantomJS - 0 views

  • PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
  • Page Automation Access and manipulate webpages with the standard DOM API, or with usual libraries like jQuery. Learn more
  • Headless Website Testing Run functional tests with frameworks such as Jasmine, QUnit, Mocha, Capybara, WebDriver, and many others. Learn more
1 - 8 of 8
Showing 20 items per page