Questions tagged [json]

JSON (JavaScript Object Notation) aka the Fat Free Alternative to XML is a lightweight data exchange format inspired by JavaScript object literals. It is often used with JavaScript, Ajax, and RESTful web services but is completely language independent.

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
245 views

Designing a flexible search API response

Quick Summary I'm building a search micro-service that will allow searching across different types of resources in a particular system (e.g. blog posts, users etc.). The API that will be exposed will ...
3
votes
0answers
918 views

Best way to build a JSON API coupled with HTML views in a Rails project

I've got a Rails eCommerce project communicating with an iOS app. The iOS app receives JSON data from the Rails back-end, but there's also HTML rendering when a user comes to the project from his ...
2
votes
0answers
1k views

Managing Login Authentication/Webpage session: Can client side javascript/JQuery access either a session variable or json variable in html?

Short version: A variable is stored in a session variable req.session.userName and also in the json sent with res.render('/', {username: value}). How can I access either of those variables from inside ...
1
vote
1answer
129 views

Handling an empty path variable request

I have a scenario where I can take a student Id as input via a part variable and return some data back as JSON objects where JavaScript handles the response as a part of AJAX call. Suppose the method ...
1
vote
0answers
411 views

Strategy to Deserialize Json of Unknown type

I find the following dilemma often. Suppose you're retrieving Json messages from a database, message bus, event store or whatever, and you need to deserialize each message into the proper type. ...
1
vote
0answers
708 views

IPC with Node.js server

I built a post processor for creating CNC machine files to which I'd like to provide a web interface. Currently the program takes a file path as input and then spits out the results into another file....
1
vote
0answers
83 views

Choice of response type in web application architecture

I've been using various server side languages/frameworks for developing back-end web applications. Every server-side framework that I've been using has the capability for returning views/templates (...
1
vote
0answers
676 views

Best practices for encoding information in URL

I have implemented a tracking pixel that is simply an img tag that another party puts on their website. This works by making the src refer to our endpoint with query params set with extra information. ...
1
vote
0answers
115 views

Two classes which are supposed to be the same, but differ in lists

I am using a 3rd party API which yields JSON which has two ways of loading data - as a list of items, or as a singular item. The problem is that a given item in the list has different properties than ...
1
vote
0answers
54 views

How do I minimize the number of database queries in a GeoJson API (of countries, and smaller areas) with custom data?

The general version of the question is above - a a little more detail, I am using Django Rest Framework, but am happy for answers to be dealing with the problem in abstract. So, I have data with ~200 ...
1
vote
0answers
207 views

Saving and retrieving multiple cached json/txt data files

I am working on some numerical programming and need to generate the results for a model given a variety of input parameters. Since the model takes a while to run, I was planning to save the data to ...
1
vote
0answers
5k views

Android, PHP session and JSON object retrieval

I am working on an app in android studio.. it currently has a login and registration system that are linked to a database and both work perfectly. I am now trying to carry over the user id value ...
1
vote
0answers
57 views

Posting different-shaped json documents to the same resource in an API

Is it a good idea to create an API in such a way that clients can post different shaped JSON documents to the same Resource? Let me give you an example and and explanation to why I am asking this. I ...
1
vote
0answers
1k views

Syncing client and server CRUD operations using json and php

I'm working on some code to sync the state of models between client (being a javascript application) and server. Often I end up writing redundant code to track the client and server objects so I can ...
1
vote
1answer
108 views

JSON APIs in PHP, across the internet

I am building a proof of concept for data processing web service, that allows users to get data cleaned, homogenized or otherwise manipulated. Often users send different types of data in the same ...
1
vote
1answer
785 views

Loading data from JSON file for one time

I have JSON file which has some hundereds of rows stored like below.. [ { "Id": "1", "Name": "A" }, { "Id": "1", "Name": "A" } ] I am trying to load this into collection of a ...
1
vote
1answer
1k views

Web application / Domain model integration using JSON capable DTOs

I'm a bit confused about architectural choices for the web-applications/java/python world. For c/c++ world the available (open source) choices to implement web applications is pretty limited to zero, ...
0
votes
0answers
27 views

JSON-RPC Json Objects Best Practices

I am building a JSON-RPC over UDP socket API in Java. There are 6 objects that will be transmitted in JSON: jsonRequest jsonSuccessResponse jsonError jsonErrorResponse jsonNotification ...
0
votes
0answers
122 views

Rails Devise & React with Graphsql

I am trying to fix an authorization/authentication strategy for a Rails app (5.2). I am migrating the front-end w/o an API. I have however connected the backend through a GraphQL flow. I am planning ...
0
votes
0answers
101 views

Frontend JSON payload that defines which classes to use in the backend

Payload: { "selection": { "ids": [1,2,3,4,5] }, "image": { "backgroundColor": "#FFFFFF", "headlineColor": "#000000", "format": "PNG" }, "processors"...
0
votes
0answers
29 views

JSON in relational DB column for 'custom' data - how to present it on web page

I am creating a generic telemetry system, which records some data about client app usages. Technology used: ASP .NET MVC with EF (code-first) hosted on Azure. There is a requirement to be able to ...
0
votes
0answers
136 views

A program, written in native code, needs to access data, read by a managed DLL

I'm working on an application, which needs to base itself on a DLL, written in managed code (C#), in order to function. That DLL contains type definitions. Therefore a convertor has been written, ...
0
votes
0answers
105 views

How to translate from managed to native class definitions

I have an input file, being the DLL of a C# piece of code, containing managed class definitions. I also have a *.json file, who determines how the conversion should be done. As an example, this is ...
0
votes
1answer
521 views

Are there any JSON based notations for Access Control Lists? (Alternative to S-Expression)

I'm looking for a notation that is familiar to modern developers and can supersede s-Notation. (additional insight into Rivest's proposal of s-Expression is here) Is there any Swagger, JSON or other ...
0
votes
0answers
424 views

Passing Data Between Tiers in 3-Tier Architecture

Assuming we are talking physical tiers, my understanding is that in order to pass data from say the data tier to the business logic tier the JSON format is used (or XML), so say I have an ORM (...
0
votes
0answers
140 views

Is it possible to use Protocol Buffers natively for message passing between a Go web service and an Android app?

I want to connect an Android app to a Go web service (I have a small social network in mind) and would like to pass data to and from the web service using Protocol Buffers, since it recently seems to ...
0
votes
1answer
747 views

JSON or XML for parsing for Google Map API

Can someone help me to find a easy way to parse XML? I have an iOS 7 Application using Google Map API. I tried to learn this on my own. I try to create an application that uses Web Services like ...
0
votes
1answer
332 views

Parsing JSON and creating analytics out of the data, what is the best way to do it?

I am on a project where I call an API and I want to make statistics with the data returned. It returns a big .json object. As that is not possible to flatten, and I am not interested on all the data ...
-1
votes
1answer
48 views

With a Web API, list of objects or dictionary with list?

Sorry if the question is worded badly, I couldn't think of a short way of explaining it without examples. My question is if you are hosting a JSON API, which is better: [ { "name": "Foo", "...
-1
votes
1answer
105 views

Relational Model to NoSQL model

I'm trying to switch my brain in to a NoSQL mode (document oriented database). I created a JSON datastructure that looks a little bit like this { "listInstances" : [ { "listClassId" : 1, ...