Wrong expansion of JSON-LD - json-ld

I'm learning to work with JSON-LD and I'm stuck on this problem. This is mine document...
{
"#context": {
"dbr": "http://dbpedia.org/resource/",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"italy": "dbr:Italy_national_football_team",
"ita_player_base_url": "italy:/",
"foaf": "http://xmlns.com/foaf/0.1/",
"team": "foaf:Organization",
"player": "foaf:Person",
"player_of": {
"#id": "foaf:member",
"#type": "#id"
},
"plays_with": {
"#id": "foaf:knows",
"#type": "#id"
},
"name": {
"#id": "foaf:name",
"#type": "xsd:string"
},
"number": {
"#id": "foaf:status",
"#type": "xsd:positiveInteger"
}
},
"#graph": [{
"name": "Buffon",
"number": "1",
"#type": "player",
"player_of": "italy",
"#id": "ita_player_base_url:Buffon"
}, {
"name": "Insigne",
"number": "20",
"#type": "player",
"player_of": "italy",
"#id": "ita_player_base_url:Insigne",
"plays_with": "ita_player_base_url:Buffon"
}]}
Then if I paste it to a JSON-LD to GIF service (or to everything else) I get that the players are "player_of":"domainOfTheValidator/italy" instead of "player_of":"http://dbpedia.org/resource/Italy_national_football_team"
Why is this happening? Obviously if I put "player_of": "dbr:Italy_national_football_team" instead of "player_of": "italy" it works... I'm getting crazy.

A compact IRI consists of a prefix, followed by :, followed by a suffix.
With "italy": "dbr:Italy_national_football_team" you are defining the prefix (italy). When you want to use it in a value, you have to use the colon (:) followed by a suffix (which is empty in your case).
So instead of
"player_of": "italy",
you would have to use
"player_of": "italy:",

Related

How do I define a custom #context for a verifiable credential?

Here is an example of a verifiable credential I want to create
{
"#context": ["https://www.w3.org/2018/credentials/v1"],
"credentialSubject": {
"id": "did:example:not-a-real-did",
"competence": ["AM", "B"],
"dateOfBirth": "1995-09-23",
"name": "Frank Franksson",
"picture": "some-random-url.png",
"ssn": "19950923-9965"
},
"holder": "did:ethr:goerli:0x027d0d3347a44b5469a8acd6e9195f6e5c3b7253ddce558238d096dd927b23055a",
"id": "https://verify.stepstone.com/credentials/c7c077a6-f0c0-4843-9718-68dfba008587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HI6Z29lcmxpOjB4MDI3ZDBkMzM0N2E0NGI1NDY5YThhY2Q2ZTkxOTVmNmU1YzNiNzI1M2RkY2U1NTgyMzhkMDk2ZGQ5MjdiMjMwNTVhIn0.-9Kd8qEpZXNDWw-RsHO9nzh-citxi8yaas_Yhaxfx4ykj4HqJz3h3SvD94HRRTWFRvXty8z2Hl3FP1vCExVLIg",
"type": "JwtProof2020"
},
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"SwedishDriversLicense"
]
}
But right now I'm only using the standard #context for verifiable credentials, I also want to include the custom fields for my specific verifiable credential like so:
{
"#context":
[
"https://www.w3.org/2018/credentials/v1",
"https://www.example.org/2022/swedish-drivers-license.jsonld"
],
....
}
How do I define my custom context https://www.example.org/2022/swedish-drivers-license.jsonld so that it matches my credential? Do I have to build on top of someone else's ontology or can is it possible for me to define the base definitions myself? How do I define that there is a required field "name" of type "string"?
This is how far I've gotten:
{
"#context": [
{
"competence": "http://example.com/vocabulary#competence",
"dateOfBirth": "http://example.com/vocabulary#dateOfBirth",
"name": "http://example.com/vocabulary#name",
"picture": "http://example.com/vocabulary#picture",
"ssn": "http://example.com/vocabulary#ssn",
}
]
}
But everything is just a uri and all examples I've found also just keep defining things in terms of more uri:s until they end at "http://schema.org/". Can I define what an "ssn" myself is without referencing a third party?
Update 1
Here is my current solution:
{
"#context": [
"https://www.w3.org/2018/credentials/v1",
{
"competence": "https://schema.org/swedishdriverslicence/competence",
"dateOfBirth": "https://schema.org/birthDate",
"name": "https://schema.org/givenName",
"picture": {
"#id": "http://schema.org/image",
"#type": "#id"
},
"ssn": "https://example.org/sweden/ssn"
}
],
"credentialSubject": {
"id": "did:example:not-a-real-did",
"competence": ["AM", "B"],
"dateOfBirth": "1995-09-23",
"name": "Frank Franksson",
"picture": "some-random-url.png",
"ssn": "19950923-9965"
},
"holder": "did:ethr:goerli:0x027d0d3347a44b5469a8acd6e9195f6e5c3b7253ddce558238d096dd927b23055a",
"id": "https://example.org/credentials/c7c077a6-f0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NzIjoiZGlkOmV0aHI6Z29lcmxpOjB4MDI3ZDBkMzM0N2E0NGI1NDY5YThhY2Q2ZTkxOTVmNmU1YzNiNzI1M2RkY2U1NTgyMzhkMDk2ZGQ5MjdiMjMwNTVhIn0.-9Kd8qEpZXNDWw-RsHO9nzh-citxi8yaas_Yhaxfx4ykj4HqJz3h3SvD94HRRTWFRvXty8z2Hl3FP1vCExVLIg",
"type": "JwtProof2020"
},
"type": [
"VerifiablePresentation",
"VerifiableCredential",
"SwedishDriversLicense"
]
}
You can view it in the playground

Parsing Nested JSON and Manipulating It in Ruby

This is my first attempt at parsing nested JSON with Ruby. I need to go through the JSON to pull out specific values for "_id", "name", and "type" for instance. I then need to create a reference table so that I can refer to each "_id" and associated information. I also need to combine information from multiple JSON responses. I've been able to get basic information and have tried a few things I've found online. I just need a little assistance with a starting point. If anyone has any ideas of where to start with this I'd really appreciate it.
Devices JSON response hash. Each device starts with _id.
{
"api": "1.0",
"error": null,
"id": "60b5d4c3077862123cfa4443",
"result": {
"devices": [
{
"_id": "123456787786211fd31f3dd",
"batteryPowered": true,
"category": "door_lock",
"deviceTypeId": "144_1_1",
"firmware": [
{
"id": "us.144.1_1.0",
"version": "2.6"
}
],
"gatewayId": "1234567807786214fbc6bd4e",
"info": {
"firmware.stack": "3.28",
"hardware": "0",
"manufacturer": "Kwikset",
"model": "912",
"protocol": "zwave",
"zwave.node": "2",
"zwave.smartstart": "no"
},
"name": "Garage Door",
"parentDeviceId": "",
"persistent": false,
"reachable": false,
"ready": true,
"roomId": "1234567807786211fd31f3eb",
"security": "middle",
"status": "idle",
"subcategory": "",
"type": "doorlock"
},
{
"_id": "1234567897786211fd31f3ed",
"batteryPowered": true,
"category": "door_lock",
"deviceTypeId": "59_1_1129",
"firmware": [
{
"id": "us.59.18064.0",
"version": "3.3"
},
{
"id": "us.59.18065.1",
"version": "11.0"
}
],
"gatewayId": "1234567897786214fbc6bd4e",
"info": {
"firmware.stack": "6.3",
"hardware": "3",
"manufacturer": "Schlage",
"model": "BE469ZP",
"protocol": "zwave",
"zwave.node": "3",
"zwave.smartstart": "no"
},
"name": "Front Door",
"parentDeviceId": "",
"persistent": false,
"reachable": true,
"ready": true,
"roomId": "1234567807786211fd31f3ec",
"security": "high",
"status": "idle",
"subcategory": "",
"type": "doorlock"
},
{
"_id": "1234567897786211fd31f40a",
"batteryPowered": false,
"category": "switch",
"deviceTypeId": "57_20562_12344",
"firmware": [
{
"id": "us.57.29240.0",
"version": "5.25"
}
],
"gatewayId": "1234567807786214fbc6bd4e",
"info": {
"firmware.stack": "4.54",
"hardware": "255",
"manufacturer": "Honeywell",
"model": "ZW4103/39337",
"protocol": "zwave",
"zwave.node": "4",
"zwave.smartstart": "no"
},
"name": "Lamp Switch",
"parentDeviceId": "",
"persistent": false,
"reachable": true,
"ready": true,
"roomId": "1234567807786211fd31f416",
"security": "no",
"status": "idle",
"subcategory": "interior_plugin",
"type": "switch.outlet"
},
{
"_id": "1234567b07786211fd31f40e",
"batteryPowered": false,
"category": "dimmable_light",
"deviceTypeId": "57_20548_12339",
"firmware": [
{
"id": "us.57.29747.0",
"version": "5.21"
}
],
"gatewayId": "1234567d07786214fbc6bd4e",
"info": {
"firmware.stack": "4.34",
"hardware": "255",
"manufacturer": "Honeywell",
"model": "39339/ZW3107",
"protocol": "zwave",
"zwave.node": "5",
"zwave.smartstart": "no"
},
"name": "Lamp Dimmer",
"parentDeviceId": "",
"persistent": false,
"reachable": true,
"ready": true,
"roomId": "1234567807786211fd31f416",
"security": "no",
"status": "idle",
"subcategory": "dimmable_plugged",
"type": "dimmer.outlet"
}
]
}
}
There is then also a JSON response that lists the functions for each device in the same format above. However instead of "devices"=> it is "items"=> and the beach function is the _id key again.
I'd like to combine function _id tags and descriptions with the device JSON, so I can create a way to send my script "unlock door lock 1" and it subs the number with the _id of the device and the function _id.
You can start with a very rough navigator function like this:
def find_device(data, name, index)
# Filter through the device list...
data['result']['devices'].select do |device|
# ...for matching names.
device.name == name
end[index] # Take indexed entry
end
Where now you can do find_device(data, 'door_lock', 0) to dig up that entry.
Converting "door lock 1" to [ 'door_lock', 0 ] should be pretty trivial:
def to_location(str)
# Split off the name component(s) and index number
*name, index = str.split(/\s+/)
# Reassemble with underscores and -1 to account for 0-index
[ name.join('_'), index.to_i - 1 ]
end

JSON-LD: "Missing ',' or ']' in array declaration." on closing </script> tag

I am marking up a local business page using Schema.org. I am trying to apply the openingHoursSpecification value using JSON-LD syntax, but I am receiving a syntax error when I validate through SDTT.
The error is on line 67 of my code, which only has the closing </script> tag.
I have tried moving the ], on line 63 to line 66 to make sure the opens and closes value/objects are a part of the openingHoursSpecification array, but I only receive more errors. I am puzzled as to what the closing </script> tag has to do with my code.
Sample code:
{
"#context": "https://schema.org",
"#type": "LocalBusiness",
"image": "http://www.website.com/example.png",
"#id": "http://www.website.com",
"name": "ExampleBusiness",
"address": {
"#type": "PostalAddress",
"streetAddress": "xxxxxxxxxxxxxxxx",
"addressLocality": "Houston",
"addressRegion": "Texas",
"postalCode": "xxxxx",
"addressCountry": "United States"
},
"review": {
"#type": "Review",
"reviewRating": {
"#type": "Rating",
"ratingValue": "4",
"bestRating": "5"
},
"author": {
"#type": "Person",
"name": "xxxxxx"
}
},
"geo": {
"#type": "GeoCoordinates",
"latitude": xx.xx,
"longitude": -xx.xx
},
"url": "http://www.example.com",
"telephone": "+0000000000",
"openingHoursSpecification": [
{
"#type": "OpeningHoursSpecification",
"dayOfWeek": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday"
],
"opens": "08:00",
"closes": "17:00"
}]
Error shown in SDTT:
You open the JSON-LD with a {, but it doesn’t end with a }. So, you need to add a } to the end:
}]
}
Another error: You need to quote all string values. So, this
"latitude": xx.xx,
"longitude": -xx.xx
should be this
"latitude": "xx.xx",
"longitude": "-xx.xx"
Unless it's just a copy-paste error when posting this question, it looks like you are just missing a closing brace '}'. You are seeing the error on line 67 because it reaches the script tag while trying to parse the JSON because there is no closing brace to terminate the parser.
Should be able to just add '}'.
One site I often use to test JSON that seems malformed is https://jsonlint.com/

In JSON-LD, is it possible to define a URI mapping for a property value?

Suppose we have the following JSON:
{
"#context":
{
"name": "http://schema.org/name",
"status": "http://schema.org/status"
},
"name": "Manu Sporny",
"status": "trollin'"
}
(JSON-LD Playground)
The trollin' status is identified with a URI: http://example.com/trolling. Is it possible to expand the trollin' keyword in the example above to the URI http://example.com/trolling?
A straightforward manipulation of the context does not work:
{
"#context":
{
"name": "http://schema.org/name",
"status": "http://schema.org/status",
"trollin'": "http://example.com/trolling"
},
"name": "Manu Sporny",
"status": "trollin'"
}
(JSON Playground)
Forcing the type of status to #id also won't work, because it will assume trollin' is a relative URI.
{
"#context":
{
"name": "http://schema.org/name",
"status": {
"#id": "http://schema.org/status",
"#type": "#id"
},
"trollin'": "http://example.com/trolling"
},
"name": "Manu Sporny",
"status": "trollin'"
}
(JSON-LD Playground)
Yes, you can do it, you need to set the type of status to #vocab:
{
"#context":
{
"name": "http://schema.org/name",
"status": {
"#id": "http://schema.org/status",
"#type": "#vocab"
},
"trollin'": "http://example.com/trolling"
},
"name": "Manu Sporny",
"status": "trollin'"
}
Here's a link to the playground.

what is wrong with this json array code facebook form

The error i am getting is this : Can't parse fields attribute. Is it a JSON array or CSV list?
The problem is in the select menu which is being included in the form. what i want to achieve is a select box as shown here on this link : Registration plugin
But somehow the problem is that the select box is not being displayed!
<iframe src='http://www.facebook.com/plugins/registration.php?
client_id=325340244194060&
redirect_uri=http://www.pingcampus.com/facebook_registration_plugin/store_user_data.php&
fields=[
{"name":"name"},
{"name":"email"},
{"name":"gender"},
{"name":"birthday"},
{'name':'captain', 'description':'Best Captain', 'type':'select', 'options':{'P':'Jean-Luc Picard','K':'James T. Kirk'}}
{'name':'captain', 'description':'College','type':'select','options':
{'P':'Jean-Luc Picard','K':'James T. Kirk',
'1':'Acropolis','2':'Astral','3':'Aurobindo','4':'BM','5':'Central','6':'Chameli','7':'IET (DAVV)','8':'IIST
','9':'IIST2
','10':'IPS
','11':'JDCT
','12':'KCB
','13':'LKCT
','14':'LNCT
','15':'MIT (Malwa)
','16':'Malwa (Malwa2)
','17':'Mandsaur
','18':'Mathuradevi
','19':'MITM (Medi1)
','20':'MIST (Medi2)
','21':'MGIEM
','22':'Nalin
','23':'Oriental
','24':'Patel
','25':'Prestige
','26':'Priyatam
','27':'Rishiraj
','28':'RKDF
','29':'Royal
','30':'Sanghvi
','31':'Sdbansal
','32':'SGSITS
','33':'SIMS
','34':'SKSITS
','35':'Star
','36':'SVCE
','37':'SVITS
','38':'Transnational
','39':'Truba
','40':'Venkateshwar
','41':'Vidhyasagar
','42':'Vikrant
','43':'Vindhya
','#':'--------------------------------
','#':'Commerce
','#':'--------------------------------
','44':'Acro
','45':'Apex
','46':'Arihant
','47':'BM
','48':'Chamelidevi
','49':'Chimc
','50':'Choithram
','51':'Christian
','52':'DCBS (Daly College)
','53':'IBMR
','54':'IIMR (IIST)
','55':'IIPS (DAVV)
','56':'Ilva
','57':'IMIR
','58':'Imperial
','59':'IMS (DAVV)
','60':'Islamia
','61':'JDCT
','62':'LKCT
','63':'LNCT
','64':'Maharaja
','65':'MIT (Malwa)
','66':'Mathuradevi
','67':'Matushri
','68':'MBKhalsa
','69':'Medicaps
','70':'Patel
','71':'Pioneer
','72':'Prestige
','73':'Priyatam
','74':'Renaissance
','75':'Rishiraj
','76':'Sahib
','77':'SAIMS
','78':'Sanghvi Innovative
','79':'Sapient
','80':'SGSITS
','81':'SIMS
','82':'SJDM
','83':'SKSITS
','84':'Softvision
','85':'SVCE
','86':'Rransnational
','87':'Vaishnav
','88':'Venkteshwar
','89':'Vidhyasagar
','90':'Vikrant
','#':'--------------------------------
','#':'Pharmacy
','#':'--------------------------------
','91':'Acropolis
','92':'Aurobindo
','93':'BM
','94':'Central
','95':'SOPE (DAVV)
','96':'IIP(IIST)
','97':'IPS
','98':'Oriental
','99':'Rishiraj
','100':'RKDF
','101':'Safe
','102':'SGSITS
','103':'Smriti (SCOPE)
','104':'svce
','105':'vikrant
','#':'--------------------------------
','#':'Medical
','#':'--------------------------------
','106':'Arihant
','107':'Bombay Hospital
','108':'Index
','109':'MGMMC
','110':'RD Memorial
','111':'Shubhdeep
','#':'--------------------------------
','#':'Dental
','#':'--------------------------------
','112':'Aurobindo
','113':'CDSH
','114':'GCD
','115':'Index
','116':'Modern
','#':'--------------------------------
','#':'Arts
','#':'--------------------------------
','117':'BIG Aims
','118':'Frameboxx
','119':'INIFD
','120':'MAAC
','121':'SDPS
','122':'SJMC (DAVV)
','123':'Virtual Voyage
','124':'Zica
','132':'EMRC (DAVV)
','#':'--------------------------------
','#':'Architecture
','#':'--------------------------------
','125':'IPS
','126':'SDPS
','#':'--------------------------------
','#':'Law
','#':'--------------------------------
','127':'Christian
','128':'SOL(DAVV)
','129':'IIL
','130':'Vaishnav'} },
{"name":"Arts","description":"Arts","type":"checkbox","value":"Arts"},
{"name":"Act","description":"Act","type":"checkbox","value":"Act"},
{"name":"Cooking","description":"Cooking","type":"checkbox","value":"Cooking"},
{"name":"Dance","description":"Dance","type":"checkbox","value":"Dance"},
{"name":"Designing","description":"Designing","type":"checkbox","value":"Designing"},
{"name":"Fashion","description":"Fashion Designing","type":"checkbox","value":"Fashion Designing"},
{"name":"Interior","description":"Interior Designing","type":"checkbox","value":"Interior Designing"},
{"name":"Modeling","description":"Modeling","type":"checkbox","value":"Modeling"},
{"name":"Photography","description":"Photography","type":"checkbox","value":"Photography"},
{"name":"Poetry","description":"Poetry / Writing","type":"checkbox","value":"Poetry / Writing"},
{"name":"Programming","description":"Programming","type":"checkbox","value":"Programming"},
{"name":"Reading","description":"Reading","type":"checkbox","value":"Reading"},
{"name":"Sketching","description":"Sketching / Drawing","type":"checkbox","value":"Sketching / Drawing"},
{"name":"Singing","description":"Singing","type":"checkbox","value":"Singing"},
{"name":"Sports","description":"Sports","type":"checkbox","value":"Sports"},
{"name":"Stunting","description":"Stunting","type":"checkbox","value":"Stunting"},
{"name":"Videography","description":"Checkthis","type":"checkbox","value":"Videography"},
{"name":"Other","description":"Other","type":"checkbox","value":"Other"},
{"name":"captcha"}
]'
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="500"
height="800"
>
</iframe>
Try to replace fields=[....] with valid JSON
[
{
"name": "name"
},
{
"name": "email"
},
{
"name": "gender"
},
{
"name": "birthday"
},
{
"name": "captain",
"description": "BestCaptain",
"type": "select",
"options": {
"P": "Jean-LucPicard",
"K": "JamesT.Kirk"
}
},
{
"name": "captain",
"description": "College",
"type": "select",
"options": {
"1": "Acropolis",
"2": "Astral",
"3": "Aurobindo",
"4": "BM",
"5": "Central",
"6": "Chameli",
"7": "IET(DAVV)",
"8": "IIST",
"9": "IIST2",
"10": "IPS",
"11": "JDCT",
"12": "KCB",
"13": "LKCT",
"14": "LNCT",
"15": "MIT(Malwa)",
"16": "Malwa(Malwa2)",
"17": "Mandsaur",
"18": "Mathuradevi",
"19": "MITM(Medi1)",
"20": "MIST(Medi2)",
"21": "MGIEM",
"22": "Nalin",
"23": "Oriental",
"24": "Patel",
"25": "Prestige",
"26": "Priyatam",
"27": "Rishiraj",
"28": "RKDF",
"29": "Royal",
"30": "Sanghvi",
"31": "Sdbansal",
"32": "SGSITS",
"33": "SIMS",
"34": "SKSITS",
"35": "Star",
"36": "SVCE",
"37": "SVITS",
"38": "Transnational",
"39": "Truba",
"40": "Venkateshwar",
"41": "Vidhyasagar",
"42": "Vikrant",
"43": "Vindhya",
"44": "Acro",
"45": "Apex",
"46": "Arihant",
"47": "BM",
"48": "Chamelidevi",
"49": "Chimc",
"50": "Choithram",
"51": "Christian",
"52": "DCBS(DalyCollege)",
"53": "IBMR",
"54": "IIMR(IIST)",
"55": "IIPS(DAVV)",
"56": "Ilva",
"57": "IMIR",
"58": "Imperial",
"59": "IMS(DAVV)",
"60": "Islamia",
"61": "JDCT",
"62": "LKCT",
"63": "LNCT",
"64": "Maharaja",
"65": "MIT(Malwa)",
"66": "Mathuradevi",
"67": "Matushri",
"68": "MBKhalsa",
"69": "Medicaps",
"70": "Patel",
"71": "Pioneer",
"72": "Prestige",
"73": "Priyatam",
"74": "Renaissance",
"75": "Rishiraj",
"76": "Sahib",
"77": "SAIMS",
"78": "SanghviInnovative",
"79": "Sapient",
"80": "SGSITS",
"81": "SIMS",
"82": "SJDM",
"83": "SKSITS",
"84": "Softvision",
"85": "SVCE",
"86": "Rransnational",
"87": "Vaishnav",
"88": "Venkteshwar",
"89": "Vidhyasagar",
"90": "Vikrant",
"91": "Acropolis",
"92": "Aurobindo",
"93": "BM",
"94": "Central",
"95": "SOPE(DAVV)",
"96": "IIP(IIST)",
"97": "IPS",
"98": "Oriental",
"99": "Rishiraj",
"100": "RKDF",
"101": "Safe",
"102": "SGSITS",
"103": "Smriti(SCOPE)",
"104": "svce",
"105": "vikrant",
"106": "Arihant",
"107": "BombayHospital",
"108": "Index",
"109": "MGMMC",
"110": "RDMemorial",
"111": "Shubhdeep",
"112": "Aurobindo",
"113": "CDSH",
"114": "GCD",
"115": "Index",
"116": "Modern",
"117": "BIGAims",
"118": "Frameboxx",
"119": "INIFD",
"120": "MAAC",
"121": "SDPS",
"122": "SJMC(DAVV)",
"123": "VirtualVoyage",
"124": "Zica",
"125": "IPS",
"126": "SDPS",
"127": "Christian",
"128": "SOL(DAVV)",
"129": "IIL",
"130": "Vaishnav",
"132": "EMRC(DAVV)",
"P": "Jean-LucPicard",
"K": "JamesT.Kirk",
"#": "--------------------------------"
}
},
{
"name": "Arts",
"description": "Arts",
"type": "checkbox",
"value": "Arts"
},
{
"name": "Act",
"description": "Act",
"type": "checkbox",
"value": "Act"
},
{
"name": "Cooking",
"description": "Cooking",
"type": "checkbox",
"value": "Cooking"
},
{
"name": "Dance",
"description": "Dance",
"type": "checkbox",
"value": "Dance"
},
{
"name": "Designing",
"description": "Designing",
"type": "checkbox",
"value": "Designing"
},
{
"name": "Fashion",
"description": "Fashion Designing",
"type": "checkbox",
"value": "Fashion Designing"
},
{
"name": "Interior",
"description": "Interior Designing",
"type": "checkbox",
"value": "Interior Designing"
},
{
"name": "Modeling",
"description": "Modeling",
"type": "checkbox",
"value": "Modeling"
},
{
"name": "Photography",
"description": "Photography",
"type": "checkbox",
"value": "Photography"
},
{
"name": "Poetry",
"description": "Poetry / Writing",
"type": "checkbox",
"value": "Poetry / Writing"
},
{
"name": "Programming",
"description": "Programming",
"type": "checkbox",
"value": "Programming"
},
{
"name": "Reading",
"description": "Reading",
"type": "checkbox",
"value": "Reading"
},
{
"name": "Sketching",
"description": "Sketching / Drawing",
"type": "checkbox",
"value": "Sketching / Drawing"
},
{
"name": "Singing",
"description": "Singing",
"type": "checkbox",
"value": "Singing"
},
{
"name": "Sports",
"description": "Sports",
"type": "checkbox",
"value": "Sports"
},
{
"name": "Stunting",
"description": "Stunting",
"type": "checkbox",
"value": "Stunting"
},
{
"name": "Videography",
"description": "Checkthis",
"type": "checkbox",
"value": "Videography"
},
{
"name": "Other",
"description": "Other",
"type": "checkbox",
"value": "Other"
},
{
"name": "captcha"
}
]
Your fields parameter for Registration social plugin contain not valid JSON object (JSON should use double quotes instead of single quotes) and you're missing , (comma) in the middle of array, after next line:
{'name':'captain', 'description':'Best Captain', 'type':'select', 'options':{'P':'Jean-Luc Picard','K':'James T. Kirk'}}
Update:
Actually even usage of just valid JSON may not work in that case due to fact that this is passed as query string arguments, so that JSON should be properly encoded to avoid problems. Also may cause some issues.
Also you have two fields named "captain" (which cause problem with registration plugin too).
Here I've created some samples (due to massive code of fields, I'm not putting them here):
Creating fields from JavaScript object and passing em to Registration plugin: http://jsfiddle.net/QwdCv/
Correctly encoded fields in URL passed directly within iframe tag src attribute: http://jsfiddle.net/QwdCv/1/

Resources