Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5    Statistic  

Bonjour.JSON

Query current results as JSON.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Bonjour 8.4 Yes Yes Yes No No

MBS( "Bonjour.JSON" )

Parameters

none

Result

Returns JSON or error.

Description

Query current results as JSON.
First level in JSON is an array with services found.
For each service, we list interfaceIndex, type, domain, serviceName, IP and port.
IP and port are brought down from found host and IP.

Hosts array for each service describes the hosts for that service. That can be one or more hosts. Each host may have several IPs to connect to.

Examples

Query results:

Set Variable [$json; MBS( "Bonjour.JSON" )]

Example result:
[{
  "interfaceIndex":  4,
  "type":  "_fmpro-rcfmp12._tcp.",
  "domain":  "local.",
  "serviceName":  "WIN-Test",
  "IP":  "2003:e1:6bc2:c272:7029:44d3:99ae:ab87",
  "port":  5003,
  "hosts":  [{
    "interfaceIndex":  4,
    "port":  5003,
    "fullName":  "WIN-Test._fmpro-rcfmp12._tcp.local.",
    "hostTarget":  "WIN-Test.local.",
    "IPs":  [{
      "port":  5003,
      "interfaceIndex":  4,
      "ip":  "2003:e1:6bc2:c272:7029:44d3:99ae:ab87",
      "hostName":  "WIN-Test.local.",
      "protocol":  "IPv6"
      }, {
      "port":  5003,
      "interfaceIndex":  4,
      "ip":  "fe80::7029:44d3:99ae:ab87",
      "hostName":  "WIN-Test.local.",
      "protocol":  "IPv6"
      }, {
      "port":  5003,
      "interfaceIndex":  4,
      "ip":  "192.168.2.122",
      "hostName":  "WIN-Test.local.",
      "protocol":  "IPv4"
      }]
    }]
  }]

See also

Example Databases

Created 28th July 2018, last changed 28th July 2018


Bonjour.Browse   -   Bonjour.Register

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos