<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Posts Related to Curl in FileMaker by FMDBSolutions Experts</title>
	<atom:link href="https://fmdbsolutions.com/tag/curl/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Tue, 22 Oct 2019 06:52:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://fmdbsolutions.com/wp-content/uploads/2017/11/16.png</url>
	<title>Posts Related to Curl in FileMaker by FMDBSolutions Experts</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Resolving the JSON Error in cURL</title>
		<link>https://fmdbsolutions.com/json-error-curl/</link>
					<comments>https://fmdbsolutions.com/json-error-curl/#respond</comments>
		
		<dc:creator><![CDATA[Vinoth]]></dc:creator>
		<pubDate>Wed, 01 Nov 2017 12:15:41 +0000</pubDate>
				<category><![CDATA[FileMaker Integration]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[JSON]]></category>
		<guid isPermaLink="false">http://fmdbsolutions.com/?p=2161</guid>

					<description><![CDATA[<p>In this post, we will talk about how to resolve the JSON error in cURL. It was a tricky conundrum but we got to the bottom of it with some trial and error. What are JSON and cURL? First, a bit of background information. JavaScript Object Notation (JSON) is essentially a readable format that is..</p>
<p>The post <a href="https://fmdbsolutions.com/json-error-curl/">Resolving the JSON Error in cURL</a> appeared first on <a href="https://fmdbsolutions.com">FileMaker Database Solutions</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-family: helvetica, arial, sans-serif;">In this post, we will talk about how to resolve the JSON error in cURL. It was a tricky conundrum but we got to the bottom of it with some trial and error.<span id="more-2161"></span></span></p>
<h3><span style="font-family: helvetica, arial, sans-serif;"><strong>What are JSON and cURL?</strong></span></h3>
<p><span style="font-family: helvetica, arial, sans-serif;">First, a bit of background information. JavaScript Object Notation (<strong><a href="https://www.json.org">JSON</a></strong>) is essentially a readable format that is used for structuring and transmitting data. Meanwhile, &#8216;<strong><a href="https://curl.haxx.se">cURL</a></strong>&#8216; (short for &#8216;client URL&#8217;) is a tool used in transferring data from one server to another.</span></p>
<h3 style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;"><b>The JSON Error</b></span></h3>
<p style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;">How did we chance upon this problem? Well, it happened when we tried to send email using the cURL.</span></p>
<p style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;">The Data for the cURL has been provided with the help of a JSON script. We got an error when we ran the cURL.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">The error message read as follows:</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;">&lt;html&gt;&lt;head&gt;&lt;title&gt;411 Invalid Request&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Invalid Request: ??&lt;/body&gt;{&#8220;ErrorCode&#8221;:402,&#8221;Message&#8221;:&#8221;Received invalid JSON input.&#8221;}&lt;html&gt;&lt;head&gt;&lt;title&gt;501 Invalid Request&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Invalid Request: ??&lt;/body&gt;{&#8220;ErrorCode&#8221;:402,&#8221;Message&#8221;:&#8221;Received invalid JSON input.&#8221;}{&#8220;ErrorCode&#8221;:403,&#8221;Message&#8221;:&#8221;Received valid, but incompatible JSON input.&#8221;}{&#8220;ErrorCode&#8221;:402,&#8221;Message&#8221;:&#8221;Received invalid JSON input.&#8221;}{&#8220;ErrorCode&#8221;:402,&#8221;Message&#8221;:&#8221;Received invalid JSON input.&#8221;}</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">Now, naturally this caused frustration. We thought we could send the email through the use of cURL but something had gone wrong. The software had a different idea in mind. So, we decided to investigate the issue and figure out the source of our woes.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">So where was the mistake made? After some digging and trying and testing different theories, we came to a conclusion: Formatting.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">You see, there was a formatting error that had somehow slipped past us. A problem in the formatting had caused this JSON error in cURL.</span></p>
<h2 style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;"><b>Solution for Fixing JSON Error in cURL</b></span></h2>
<p><span style="font-family: helvetica, arial, sans-serif;">If you have faced the same or similar issue, make sure you have the proper format. Even if you haven&#8217;t, check right now and implement it as this will keep you from running into the problem in the future.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">So, what is the proper format for JSON input in cURL? Well, we&#8217;ll tell you.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">The correct JSON format should look like this:</span></p>
<p style="text-align: left; padding-left: 30px;"><span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;">&#8220;-X POST</span><br />
<span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;"> -H \&#8221;Accept: application/json\&#8221;</span><br />
<span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;"> -H \&#8221;Content-Type: application/json\&#8221;</span><br />
<span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;"> -H \&#8221;X-Postmark-Server-Token: tokenvalue\&#8221;</span><br />
<span style="font-family: helvetica, arial, sans-serif; font-size: 10pt;">&#8211;data{\”From\&#8221;:\&#8221;test1@mail.com\&#8221;,\&#8221;To\&#8221;:\&#8221;test2@mail.com\&#8221;,\&#8221;TemplateId\&#8221;:tempid,\&#8221;TemplateModel\&#8221;:{\&#8221;commenter_name\&#8221;:\&#8221;commenter_name_Value\&#8221;,\&#8221;body\&#8221;:\&#8221;body_Value\&#8221;,\&#8221;attachment_details\&#8221;:[{\&#8221;attachment_url\&#8221;:\&#8221;attachment_url_Value\&#8221;,\&#8221;attachment_name\&#8221;:\&#8221;attachment_name_Value\&#8221;,\ &#8220;attachment_size\&#8221;:\&#8221;attachment_size_Value\&#8221;,\&#8221;attachment_type\&#8221;:\&#8221;attachment_type_Value\&#8221;}],\&#8221;timestamp\ &#8220;:\&#8221;timestamp_Value\&#8221;,\&#8221;action_url\&#8221;:\&#8221;action_url_Value\&#8221;,\&#8221;notifications_url\&#8221;:\&#8221;notifications_url_Value\&#8221;}}&#8221;</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">We made the changes and we were able to send our email properly, thus fixing the JSON error in cURL. This worked for us and should work just as well for you.</span></p>
<h2 style="text-align: left;"><span style="font-family: helvetica, arial, sans-serif;"><strong>FileMaker Fixes from FMDBSolutions</strong></span></h2>
<p><span style="font-family: helvetica, arial, sans-serif;">The team at FMDBSolutions hopes this article taught you how to solve the JSON Error in cURL. If you are still facing problems with this issue or another one, <span style="color: #800080;"><strong><a style="color: #800080;" href="https://fmdbsolutions.com/contact-us/">contact us</a></strong></span>. FMDBSolutions is a team of well-qualified experts that have a lot of experience with the many versions of FileMaker Pro and the <span style="color: #800080;"><strong><a style="color: #800080;" href="https://fmdbsolutions.com/filemaker-go-development/">FileMaker Go</a></strong></span> app too.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">This JSON error in cURL is actually nothing compared to some of the other dilemmas that we faced, such as <span style="color: #800080;"><strong><a style="color: #800080;" href="https://fmdbsolutions.com/enabling-filemaker-server/">enabling the Web Server</a></strong></span> or <a href="https://fmdbsolutions.com/pdf-filemaker-preview-mode/"><strong><span style="color: #ff00ff;"><span style="color: #800080;">making PDF display in Preview Mode</span></span></strong></a>. There are many similar issues but we guarantee you that we have the capability to deal with any difficulties when it comes to FileMaker.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">Our team knows all about transitioning, migrating, converting, and upgrading for FileMaker. Companies that require <span style="color: #800080;"><strong><a style="color: #800080;" href="https://fmdbsolutions.com/filemaker-integration/">FileMaker Integration</a></strong></span> can also use our services. We have worked with clients from the USA, Australia, and Singapore and will complete your FileMaker assignment in the best possible way at a lower price but the same or higher level of excellence. </span></p>
<p><span style="font-family: helvetica, arial, sans-serif;">If you want solutions to your FileMaker database, we can help. Click the below box for a free FileMaker consultation.</span></p>
<p><span style="font-family: helvetica, arial, sans-serif;"><a href="https://fmdbsolutions.com/free-filemaker-consultation/"><img decoding="async" class="alignnone" src="https://fmdbsolutions.com/wp-content/uploads/2017/12/lets-start.png" alt="" width="300" height="100" /></a></span></p>
<p style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;">You can also leave us your email below for receiving new updates regarding FileMaker and our company.</span></p>
<p style="text-align: justify;"><span style="font-family: helvetica, arial, sans-serif;">[contact-form-7]</span></p>
<p>The post <a href="https://fmdbsolutions.com/json-error-curl/">Resolving the JSON Error in cURL</a> appeared first on <a href="https://fmdbsolutions.com">FileMaker Database Solutions</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fmdbsolutions.com/json-error-curl/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
