evenicoulddoit / django-rest-framework-serializer-extensions

Extensions to help DRY up Django Rest Framework serializers
Other
247 stars 23 forks source link

Name the result array #23

Closed noelvillaman closed 6 years ago

noelvillaman commented 6 years ago

Is there a way to give a name to you Json array? Or what would be the name of the array?

evenicoulddoit commented 6 years ago

I'm sorry but I have no idea what you mean. Could you please elaborate?

noelvillaman commented 6 years ago

["glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": { "para": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML"] }, "GlossSee": "markup" } } } } }The example above shows that "glossary" is the name of this array. Is there a way to add a name like this?

noel.

On Thu, Jul 19, 2018, 1:43 PM Ian Clark notifications@github.com wrote:

I'm sorry but I have no idea what you mean. Could you please elaborate?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions/issues/23#issuecomment-406358658, or mute the thread https://github.com/notifications/unsubscribe-auth/AE7dmtm5qaABJ6H56FNUJhUY8Rp7Uypvks5uIMVGgaJpZM4VWhlA .

evenicoulddoit commented 6 years ago

That's not how Arrays work

noelvillaman commented 6 years ago

Yes, it is. They do have a name. Copy and past your result array to myjson.com and you will get an error. Your project is missing that.

On Fri, Jul 20, 2018, 5:17 AM Ian Clark notifications@github.com wrote:

Closed #23 https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions/issues/23 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions/issues/23#event-1744364165, or mute the thread https://github.com/notifications/unsubscribe-auth/AE7dmvEiF9KIimhnEf5du08G8EAXmh82ks5uIaA3gaJpZM4VWhlA .

evenicoulddoit commented 6 years ago

https://jsonformatter.org/c76368